home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 15 / BBS in a box XV-2.iso / Files II / Prog / D-G / Graphics 1.0.sit / GRAPHICS manual
MacBinary  |  1995-06-02  |  23.4 KB  |  [TEXT/ttxt]

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: MacBinary (archive/macBinary).

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert GFA-BASIC Atari (other/gfaBASICAtari) magic Supported
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, inited, Fri Jun 2 15:03:23 1995, modified Fri Jun 2 15:03:23 1995, creator SimpleText, type ASCII, 23362 bytes "GRAPHICS manual" , at 0x5bc2 332 bytes resource default (weak)
99% file data default
46% TrID GFA-BASIC Atari tokenized source (generic) default
39% TrID Macintosh plain text (MacBinary) default
13% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[ttxt]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0f 47 52 41 50 48 49 | 43 53 20 6d 61 6e 75 61 |..GRAPHI|CS manua|
|00000010| 6c 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |l.......|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 74 74 78 | 74 01 00 00 00 00 00 00 |.TEXTttx|t.......|
|00000050| 00 00 00 00 00 5b 42 00 | 00 01 4c ab f5 10 fb ab |.....[B.|..L.....|
|00000060| f5 10 fb 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 79 ee 00 00 |........|....y...|
|00000080| 09 09 09 09 09 09 09 09 | 09 09 09 09 09 09 09 09 |........|........|
|00000090| 47 52 41 50 48 49 43 53 | 20 31 2e 30 3a 20 41 20 |GRAPHICS| 1.0: A |
|000000a0| 53 70 72 69 74 65 20 41 | 6e 69 6d 61 74 69 6f 6e |Sprite A|nimation|
|000000b0| 20 41 69 64 0d 09 09 09 | 09 09 09 09 09 09 09 09 | Aid....|........|
|000000c0| 09 09 09 09 09 09 43 6f | 70 79 72 69 67 68 74 20 |......Co|pyright |
|000000d0| 31 39 39 35 20 62 79 20 | 4d 61 74 74 68 65 77 20 |1995 by |Matthew |
|000000e0| 46 6f 72 6d 69 63 61 0d | 0d 09 09 09 09 09 09 09 |Formica.|........|
|000000f0| 09 09 09 09 09 09 09 09 | 09 09 09 09 09 65 2d 6d |........|.....e-m|
|00000100| 61 69 6c 3a 20 20 50 72 | 6f 67 6f 66 66 40 41 4f |ail: Pr|ogoff@AO|
|00000110| 4c 2e 63 6f 6d 0d 0d 09 | 09 09 09 09 09 09 09 09 |L.com...|........|
|00000120| 09 09 09 09 09 09 09 48 | 6f 6d 65 20 61 64 64 72 |.......H|ome addr|
|00000130| 65 73 73 3a 20 36 36 30 | 32 20 43 68 65 73 74 6e |ess: 660|2 Chestn|
|00000140| 75 74 20 53 74 2e 0d 09 | 09 09 09 09 09 09 09 09 |ut St...|........|
|00000150| 09 09 09 09 09 09 09 09 | 09 09 09 09 09 09 09 09 |........|........|
|00000160| 09 09 09 55 70 70 65 72 | 20 44 61 72 62 79 2c 20 |...Upper| Darby, |
|00000170| 50 41 20 31 39 30 38 32 | 0d 0d 09 09 09 09 09 09 |PA 19082|........|
|00000180| 09 09 4e 65 65 64 65 64 | 3a 20 54 68 69 6e 6b 20 |..Needed|: Think |
|00000190| 50 61 73 63 61 6c 20 33 | 20 6f 72 20 34 2c 20 61 |Pascal 3| or 4, a|
|000001a0| 20 32 35 36 20 63 6f 6c | 6f 72 20 6d 61 63 2c 20 | 256 col|or mac, |
|000001b0| 61 6e 64 20 33 32 2d 62 | 69 74 20 51 75 69 63 6b |and 32-b|it Quick|
|000001c0| 44 72 61 77 0d 0d 09 54 | 68 69 73 20 69 73 20 61 |Draw...T|his is a|
|000001d0| 20 70 72 6f 67 72 61 6d | 6d 69 6e 67 20 74 6f 6f | program|ming too|
|000001e0| 6c 6b 69 74 20 74 68 61 | 74 20 70 72 6f 76 69 64 |lkit tha|t provid|
|000001f0| 65 73 20 6d 61 6e 79 20 | 63 6f 6d 6d 61 6e 64 73 |es many |commands|
|00000200| 20 69 6e 20 50 61 73 63 | 61 6c 20 66 6f 72 20 6e | in Pasc|al for n|
|00000210| 6f 76 69 63 65 20 70 72 | 6f 67 72 61 6d 6d 65 72 |ovice pr|ogrammer|
|00000220| 73 2c 20 74 6f 20 61 69 | 64 20 74 68 65 6d 20 69 |s, to ai|d them i|
|00000230| 6e 20 70 72 6f 67 72 61 | 6d 6d 69 6e 67 20 67 72 |n progra|mming gr|
|00000240| 65 61 74 20 67 72 61 70 | 68 69 63 61 6c 20 67 61 |eat grap|hical ga|
|00000250| 6d 65 73 2e 20 20 46 72 | 6f 6d 20 68 65 72 65 20 |mes. Fr|om here |
|00000260| 6f 6e 2c 20 74 68 69 73 | 20 6c 69 62 72 61 72 79 |on, this| library|
|00000270| 20 6f 66 20 70 72 6f 63 | 65 64 75 72 65 73 20 77 | of proc|edures w|
|00000280| 69 6c 6c 20 62 65 20 6b | 6e 6f 77 6e 20 73 69 6d |ill be k|nown sim|
|00000290| 70 6c 79 20 61 73 20 74 | 68 65 20 47 52 41 46 20 |ply as t|he GRAF |
|000002a0| 6c 69 62 72 61 72 79 2c | 20 6f 72 20 6a 75 73 74 |library,| or just|
|000002b0| 20 70 6c 61 69 6e 20 47 | 52 41 46 2e 20 20 41 64 | plain G|RAF. Ad|
|000002c0| 64 20 69 74 20 74 6f 20 | 74 68 65 20 55 53 45 53 |d it to |the USES|
|000002d0| 20 63 6c 61 75 73 65 20 | 6f 66 20 79 6f 75 72 20 | clause |of your |
|000002e0| 70 72 6f 67 72 61 6d 3b | 20 73 65 65 20 74 68 65 |program;| see the|
|000002f0| 20 64 65 6d 6f 73 20 69 | 66 20 79 6f 75 20 64 6f | demos i|f you do|
|00000300| 6e 27 74 20 6b 6e 6f 77 | 20 68 6f 77 20 74 6f 20 |n't know| how to |
|00000310| 64 6f 20 74 68 69 73 2e | 20 20 49 20 77 69 6c 6c |do this.| I will|
|00000320| 20 63 6f 6e 74 69 6e 75 | 65 20 74 6f 20 73 75 70 | continu|e to sup|
|00000330| 70 6f 72 74 20 74 68 69 | 73 20 66 72 65 65 20 70 |port thi|s free p|
|00000340| 72 6f 64 75 63 74 20 6f | 6e 6c 79 20 69 66 20 49 |roduct o|nly if I|
|00000350| 20 67 65 74 20 61 20 67 | 6f 6f 64 20 72 65 73 70 | get a g|ood resp|
|00000360| 6f 6e 73 65 20 66 72 6f | 6d 20 74 68 6f 73 65 20 |onse fro|m those |
|00000370| 77 68 6f 20 75 73 65 20 | 47 52 41 46 20 61 6e 64 |who use |GRAF and|
|00000380| 20 65 6e 6a 6f 79 20 69 | 74 2e 20 20 59 6f 75 20 | enjoy i|t. You |
|00000390| 63 61 6e 20 65 2d 6d 61 | 69 6c 20 6d 65 20 77 69 |can e-ma|il me wi|
|000003a0| 74 68 20 63 6f 6d 6d 65 | 6e 74 73 2c 20 62 75 67 |th comme|nts, bug|
|000003b0| 2d 6e 6f 74 65 73 28 70 | 6c 65 61 73 65 21 29 2c |-notes(p|lease!),|
|000003c0| 20 73 75 67 67 65 73 74 | 69 6f 6e 73 2c 20 65 74 | suggest|ions, et|
|000003d0| 63 2e 20 61 74 20 50 72 | 6f 67 6f 66 66 40 41 4f |c. at Pr|ogoff@AO|
|000003e0| 4c 2e 63 6f 6d 2c 20 61 | 6e 64 20 49 20 68 6f 70 |L.com, a|nd I hop|
|000003f0| 65 20 79 6f 75 20 64 6f | 2e 20 20 41 73 20 49 27 |e you do|. As I'|
|00000400| 76 65 20 61 6c 72 65 61 | 64 79 20 73 61 69 64 2c |ve alrea|dy said,|
|00000410| 20 47 52 41 46 20 69 73 | 20 66 72 65 65 2c 20 62 | GRAF is| free, b|
|00000420| 75 74 20 49 20 64 6f 20 | 61 73 6b 20 74 68 61 74 |ut I do |ask that|
|00000430| 20 69 66 20 79 6f 75 20 | 72 65 6c 65 61 73 65 20 | if you |release |
|00000440| 61 6e 79 20 67 61 6d 65 | 73 20 75 73 69 6e 67 20 |any game|s using |
|00000450| 74 68 69 73 20 6c 69 62 | 72 61 72 79 20 6f 72 20 |this lib|rary or |
|00000460| 63 6f 64 65 20 63 6f 70 | 69 65 64 20 66 72 6f 6d |code cop|ied from|
|00000470| 20 69 74 20 74 6f 20 74 | 68 65 20 70 75 62 6c 69 | it to t|he publi|
|00000480| 63 20 28 66 72 65 65 77 | 61 72 65 2c 20 73 68 61 |c (freew|are, sha|
|00000490| 72 65 77 61 72 65 2c 20 | 70 75 62 6c 69 63 20 64 |reware, |public d|
|000004a0| 6f 6d 61 69 6e 2c 20 65 | 74 63 2e 29 20 79 6f 75 |omain, e|tc.) you|
|000004b0| 20 77 6f 75 6c 64 20 73 | 65 6e 64 20 6d 65 20 61 | would s|end me a|
|000004c0| 20 66 72 65 65 20 63 6f | 70 79 2c 20 61 6e 64 20 | free co|py, and |
|000004d0| 6d 61 6b 65 20 6d 65 20 | 61 20 66 75 6c 6c 20 72 |make me |a full r|
|000004e0| 65 67 69 73 74 65 72 65 | 64 20 75 73 65 72 20 69 |egistere|d user i|
|000004f0| 66 20 74 68 61 74 20 61 | 70 70 6c 69 65 73 2e 20 |f that a|pplies. |
|00000500| 20 53 65 6e 64 20 74 68 | 65 20 70 72 6f 67 72 61 | Send th|e progra|
|00000510| 6d 20 74 6f 20 50 72 6f | 67 6f 66 66 40 41 4f 4c |m to Pro|goff@AOL|
|00000520| 2e 63 6f 6d 28 20 69 66 | 20 79 6f 75 27 72 65 20 |.com( if| you're |
|00000530| 6f 6e 20 41 6d 65 72 69 | 63 61 20 4f 6e 6c 69 6e |on Ameri|ca Onlin|
|00000540| 65 29 2c 20 6f 72 20 74 | 68 65 20 61 64 64 72 65 |e), or t|he addre|
|00000550| 73 73 20 61 62 6f 76 65 | 2e 20 20 48 6f 77 65 76 |ss above|. Howev|
|00000560| 65 72 2c 20 79 6f 75 20 | 64 6f 6e 27 74 20 68 61 |er, you |don't ha|
|00000570| 76 65 20 74 6f 20 67 69 | 76 65 20 6d 65 20 61 6e |ve to gi|ve me an|
|00000580| 79 20 63 72 65 64 69 74 | 20 69 6e 20 74 68 65 20 |y credit| in the |
|00000590| 61 62 6f 75 74 20 62 6f | 78 20 6f 66 20 79 6f 75 |about bo|x of you|
|000005a0| 72 20 70 72 6f 67 72 61 | 6d 2c 20 6f 72 20 74 68 |r progra|m, or th|
|000005b0| 65 20 64 6f 63 20 66 69 | 6c 65 73 2e 20 20 54 68 |e doc fi|les. Th|
|000005c0| 69 73 20 6d 61 6e 75 61 | 6c 20 69 73 20 6e 6f 74 |is manua|l is not|
|000005d0| 20 63 6f 6d 70 6c 65 74 | 65 20 62 79 20 61 6e 79 | complet|e by any|
|000005e0| 20 6d 65 61 6e 73 2e 20 | 20 49 20 77 69 6c 6c 20 | means. | I will |
|000005f0| 6a 75 73 74 20 70 72 6f | 76 69 64 65 20 61 20 66 |just pro|vide a f|
|00000600| 65 77 20 6e 6f 74 65 73 | 20 68 65 72 65 20 6f 6e |ew notes| here on|
|00000610| 20 75 73 61 67 65 20 66 | 6f 72 20 65 61 63 68 20 | usage f|or each |
|00000620| 63 6f 6d 6d 61 6e 64 2e | 20 20 46 6f 72 20 74 68 |command.| For th|
|00000630| 6f 73 65 20 6f 66 20 79 | 6f 75 20 77 68 6f 20 61 |ose of y|ou who a|
|00000640| 72 65 20 68 61 63 6b 73 | 2c 20 6f 72 20 69 66 20 |re hacks|, or if |
|00000650| 79 6f 75 20 77 61 6e 74 | 20 74 6f 20 70 6c 6f 77 |you want| to plow|
|00000660| 20 74 68 72 6f 75 67 68 | 20 74 68 65 20 63 6f 64 | through| the cod|
|00000670| 65 20 74 6f 20 66 69 6e | 64 20 61 20 62 75 67 2c |e to fin|d a bug,|
|00000680| 20 47 52 41 46 20 68 61 | 73 20 4e 4f 54 20 62 65 | GRAF ha|s NOT be|
|00000690| 65 6e 20 63 6f 6d 70 69 | 6c 65 64 20 69 6e 74 6f |en compi|led into|
|000006a0| 20 61 20 6c 69 62 72 61 | 72 79 2e 20 20 49 20 68 | a libra|ry. I h|
|000006b0| 61 76 65 20 6c 65 66 74 | 20 69 74 20 61 73 20 61 |ave left| it as a|
|000006c0| 20 75 6e 69 74 2c 20 73 | 6f 20 79 6f 75 20 63 61 | unit, s|o you ca|
|000006d0| 6e 20 73 65 65 20 61 6e | 64 20 6c 65 61 72 6e 20 |n see an|d learn |
|000006e0| 68 6f 77 20 49 20 64 69 | 64 20 69 74 2e 20 20 49 |how I di|d it. I|
|000006f0| 66 20 79 6f 75 20 63 6f | 6d 65 20 75 70 20 77 69 |f you co|me up wi|
|00000700| 74 68 20 61 6e 79 20 67 | 65 6e 69 75 73 20 63 6f |th any g|enius co|
|00000710| 6d 6d 61 6e 64 73 20 74 | 6f 20 61 64 64 20 74 6f |mmands t|o add to|
|00000720| 20 74 68 69 73 2c 20 70 | 6c 65 61 73 65 20 6c 65 | this, p|lease le|
|00000730| 74 20 6d 65 20 6b 6e 6f | 77 2c 20 61 6e 64 20 69 |t me kno|w, and i|
|00000740| 66 20 49 20 74 68 69 6e | 6b 20 74 68 65 79 27 72 |f I thin|k they'r|
|00000750| 65 20 67 6f 6f 64 2c 20 | 49 20 6d 69 67 68 74 20 |e good, |I might |
|00000760| 61 64 64 20 74 68 65 6d | 2e 0d 0d 53 54 41 4e 44 |add them|...STAND|
|00000770| 41 52 44 20 44 49 53 43 | 4c 41 49 4d 45 52 3a 20 |ARD DISC|LAIMER: |
|00000780| 49 66 20 74 68 69 73 20 | 73 6f 66 74 77 61 72 65 |If this |software|
|00000790| 20 74 75 72 6e 73 20 79 | 6f 75 72 20 6d 61 63 20 | turns y|our mac |
|000007a0| 69 6e 74 6f 20 61 20 50 | 43 2c 20 74 75 72 6e 73 |into a P|C, turns|
|000007b0| 20 79 6f 75 20 69 6e 74 | 6f 20 61 6e 20 61 6c 69 | you int|o an ali|
|000007c0| 65 6e 2c 20 63 61 75 73 | 65 73 20 74 68 65 20 6c |en, caus|es the l|
|000007d0| 6f 73 73 20 6f 66 20 61 | 6e 79 20 64 61 74 61 2c |oss of a|ny data,|
|000007e0| 20 73 6f 66 74 77 61 72 | 65 2c 20 6f 72 20 68 61 | softwar|e, or ha|
|000007f0| 72 64 77 61 72 65 2c 20 | 6f 72 20 64 6f 65 73 20 |rdware, |or does |
|00000800| 61 6e 79 20 6f 74 68 65 | 72 20 64 61 6d 61 67 65 |any othe|r damage|
|00000810| 20 6f 66 20 61 6e 79 20 | 6b 69 6e 64 2c 20 49 20 | of any |kind, I |
|00000820| 61 6d 20 6e 6f 74 20 72 | 65 73 70 6f 6e 73 69 62 |am not r|esponsib|
|00000830| 6c 65 2e 0d 0d 54 48 49 | 4e 4b 20 50 41 53 43 41 |le...THI|NK PASCA|
|00000840| 4c 20 33 20 4e 4f 54 45 | 3a 20 47 52 41 46 20 77 |L 3 NOTE|: GRAF w|
|00000850| 69 6c 6c 20 77 6f 72 6b | 20 77 69 74 68 20 54 68 |ill work| with Th|
|00000860| 69 6e 6b 20 50 61 73 63 | 61 6c 20 33 20 61 6e 64 |ink Pasc|al 3 and|
|00000870| 20 34 2e 20 20 49 6e 20 | 75 73 69 6e 67 20 47 52 | 4. In |using GR|
|00000880| 41 46 20 66 72 6f 6d 20 | 54 68 69 6e 6b 20 50 61 |AF from |Think Pa|
|00000890| 73 63 61 6c 20 33 2c 20 | 79 6f 75 20 6d 75 73 74 |scal 3, |you must|
|000008a0| 20 63 6f 6d 70 69 6c 65 | 20 61 6c 6c 20 70 72 6f | compile| all pro|
|000008b0| 67 72 61 6d 73 20 75 73 | 69 6e 67 20 47 52 41 46 |grams us|ing GRAF|
|000008c0| 20 74 6f 20 72 75 6e 20 | 74 68 65 6d 2e 20 44 4f | to run |them. DO|
|000008d0| 20 4e 4f 54 20 74 72 79 | 20 74 6f 20 72 75 6e 20 | NOT try| to run |
|000008e0| 61 20 70 72 6f 67 72 61 | 6d 20 75 73 69 6e 67 20 |a progra|m using |
|000008f0| 47 52 41 46 20 66 72 6f | 6d 20 77 69 74 68 69 6e |GRAF fro|m within|
|00000900| 20 54 68 69 6e 6b 20 50 | 61 73 63 61 6c 20 33 2c | Think P|ascal 3,|
|00000910| 20 62 65 63 61 75 73 65 | 20 69 74 20 77 69 6c 6c | because| it will|
|00000920| 20 63 72 61 73 68 2e 20 | 20 49 66 20 79 6f 75 20 | crash. | If you |
|00000930| 6a 75 73 74 20 62 75 69 | 6c 64 20 61 70 70 6c 69 |just bui|ld appli|
|00000940| 63 61 74 69 6f 6e 73 20 | 66 6f 72 20 61 6c 6c 20 |cations |for all |
|00000950| 70 72 6f 67 72 61 6d 73 | 20 74 6f 20 72 75 6e 20 |programs| to run |
|00000960| 61 6e 64 20 74 65 73 74 | 20 74 68 65 6d 2c 20 69 |and test| them, i|
|00000970| 74 20 77 69 6c 6c 20 77 | 6f 72 6b 20 66 69 6e 65 |t will w|ork fine|
|00000980| 2c 20 68 6f 77 65 76 65 | 72 2e 20 20 49 20 6d 79 |, howeve|r. I my|
|00000990| 73 65 6c 66 20 75 73 65 | 20 54 68 69 6e 6b 20 50 |self use| Think P|
|000009a0| 61 73 63 61 6c 20 33 2e | 0d 0d 09 54 48 45 20 44 |ascal 3.|...THE D|
|000009b0| 45 4d 4f 53 3a 20 20 41 | 6c 73 6f 20 69 6e 63 6c |EMOS: A|lso incl|
|000009c0| 75 64 65 64 20 69 6e 20 | 74 68 69 73 20 70 61 63 |uded in |this pac|
|000009d0| 6b 61 67 65 20 61 72 65 | 20 74 68 72 65 65 20 64 |kage are| three d|
|000009e0| 65 6d 6f 20 70 72 6f 67 | 72 61 6d 73 20 74 6f 20 |emo prog|rams to |
|000009f0| 73 68 6f 77 20 79 6f 75 | 20 68 6f 77 20 74 6f 20 |show you| how to |
|00000a00| 75 73 65 20 47 52 41 46 | 2e 20 20 54 68 65 79 20 |use GRAF|. They |
|00000a10| 61 72 65 3a 20 47 52 41 | 46 20 42 61 73 69 63 2c |are: GRA|F Basic,|
|00000a20| 20 47 52 41 46 20 43 6f | 6c 6c 69 73 69 6f 6e 73 | GRAF Co|llisions|
|00000a30| 2c 20 61 6e 64 20 47 52 | 41 46 20 41 72 63 61 64 |, and GR|AF Arcad|
|00000a40| 65 2e 20 20 45 61 63 68 | 20 66 6f 6c 64 65 72 20 |e. Each| folder |
|00000a50| 63 6f 6e 74 61 69 6e 69 | 6e 67 20 61 20 64 65 6d |containi|ng a dem|
|00000a60| 6f 20 63 6f 6e 74 61 69 | 6e 73 20 74 68 65 20 63 |o contai|ns the c|
|00000a70| 6f 6d 70 69 6c 65 64 20 | 61 70 70 2e 20 6f 66 20 |ompiled |app. of |
|00000a80| 74 68 61 74 20 64 65 6d | 6f 2c 20 74 68 65 20 73 |that dem|o, the s|
|00000a90| 6f 75 72 63 65 20 63 6f | 64 65 20 66 6f 72 20 74 |ource co|de for t|
|00000aa0| 68 61 74 20 64 65 6d 6f | 2c 20 61 20 63 6f 70 79 |hat demo|, a copy|
|00000ab0| 20 6f 66 20 74 68 65 20 | 47 52 41 46 20 75 6e 69 | of the |GRAF uni|
|00000ac0| 74 2c 20 61 6e 64 20 74 | 68 65 20 72 65 73 6f 75 |t, and t|he resou|
|00000ad0| 72 63 65 20 66 6f 72 20 | 74 68 61 74 20 64 65 6d |rce for |that dem|
|00000ae0| 6f 2e 20 20 4e 6f 20 70 | 72 6f 6a 65 63 74 20 69 |o. No p|roject i|
|00000af0| 73 20 69 6e 63 6c 75 64 | 65 64 2c 20 74 6f 20 73 |s includ|ed, to s|
|00000b00| 61 76 65 20 73 70 61 63 | 65 2e 20 20 54 68 65 20 |ave spac|e. The |
|00000b10| 47 52 41 46 20 75 6e 69 | 74 20 73 68 6f 75 6c 64 |GRAF uni|t should|
|00000b20| 20 63 6f 6d 65 20 62 65 | 66 6f 72 65 20 61 6e 79 | come be|fore any|
|00000b30| 20 6f 74 68 65 72 20 6d | 61 69 6e 20 73 6f 75 72 | other m|ain sour|
|00000b40| 63 65 20 63 6f 64 65 20 | 66 69 6c 65 73 20 74 68 |ce code |files th|
|00000b50| 61 74 20 75 73 65 20 69 | 74 2e 20 47 52 41 46 20 |at use i|t. GRAF |
|00000b60| 42 61 73 69 63 20 69 73 | 20 61 20 76 65 72 79 20 |Basic is| a very |
|00000b70| 74 72 69 76 69 61 6c 20 | 70 72 6f 67 72 61 6d 20 |trivial |program |
|00000b80| 74 68 61 74 20 6a 75 73 | 74 20 6d 61 6b 65 73 20 |that jus|t makes |
|00000b90| 73 6f 6d 65 20 62 61 6c | 6c 73 20 62 6f 75 6e 63 |some bal|ls bounc|
|00000ba0| 65 20 61 72 6f 75 6e 64 | 2e 20 20 47 52 41 46 20 |e around|. GRAF |
|00000bb0| 43 6f 6c 6c 69 73 69 6f | 6e 73 20 69 73 20 6d 6f |Collisio|ns is mo|
|00000bc0| 72 65 20 68 69 67 68 20 | 74 65 63 68 2c 20 68 61 |re high |tech, ha|
|00000bd0| 76 69 6e 67 20 74 77 6f | 20 72 6f 63 6b 65 74 73 |ving two| rockets|
|00000be0| 20 63 6f 6c 6c 69 64 65 | 2c 20 61 6e 64 20 65 78 | collide|, and ex|
|00000bf0| 70 6c 6f 64 65 20 77 68 | 65 6e 20 74 68 65 79 20 |plode wh|en they |
|00000c00| 64 6f 2e 20 20 47 52 41 | 46 20 41 72 63 61 64 65 |do. GRA|F Arcade|
|00000c10| 20 69 73 20 61 20 63 6f | 6d 70 6c 65 74 65 20 61 | is a co|mplete a|
|00000c20| 72 63 61 64 65 20 67 61 | 6d 65 2c 20 77 68 65 72 |rcade ga|me, wher|
|00000c30| 65 20 79 6f 75 20 68 61 | 76 65 20 74 77 6f 20 67 |e you ha|ve two g|
|00000c40| 75 79 73 20 74 68 61 74 | 20 63 61 6e 20 66 69 67 |uys that| can fig|
|00000c50| 68 74 20 65 61 63 68 20 | 6f 74 68 65 72 2e 20 20 |ht each |other. |
|00000c60| 41 6c 6c 20 64 65 6d 6f | 73 20 72 65 71 75 69 72 |All demo|s requir|
|00000c70| 65 20 61 20 63 6c 69 63 | 6b 20 6f 66 20 74 68 65 |e a clic|k of the|
|00000c80| 20 6d 6f 75 73 65 20 62 | 75 74 74 6f 6e 20 74 6f | mouse b|utton to|
|00000c90| 20 71 75 69 74 20 74 68 | 65 6d 2e 20 20 46 72 6f | quit th|em. Fro|
|00000ca0| 6d 20 74 68 65 73 65 20 | 64 65 6d 6f 73 2c 20 79 |m these |demos, y|
|00000cb0| 6f 75 20 73 68 6f 75 6c | 64 20 62 65 20 61 62 6c |ou shoul|d be abl|
|00000cc0| 65 20 74 6f 20 6c 65 61 | 72 6e 20 6d 6f 73 74 20 |e to lea|rn most |
|00000cd0| 6f 66 20 74 68 65 20 69 | 6d 70 6f 72 74 61 6e 74 |of the i|mportant|
|00000ce0| 20 72 6f 75 74 69 6e 65 | 73 20 66 6f 72 20 75 73 | routine|s for us|
|00000cf0| 69 6e 67 20 47 52 41 46 | 2e 20 20 59 6f 75 20 77 |ing GRAF|. You w|
|00000d00| 69 6c 6c 20 61 6c 73 6f | 20 66 69 6e 64 20 73 6f |ill also| find so|
|00000d10| 6d 65 20 6f 74 68 65 72 | 20 67 65 6e 65 72 61 6c |me other| general|
|00000d20| 20 72 6f 75 74 69 6e 65 | 73 20 28 6c 69 6b 65 20 | routine|s (like |
|00000d30| 61 20 72 6f 75 74 69 6e | 65 20 69 6e 20 47 52 41 |a routin|e in GRA|
|00000d40| 46 2e 41 72 63 61 64 65 | 20 74 68 61 74 20 63 68 |F.Arcade| that ch|
|00000d50| 65 63 6b 73 20 74 68 65 | 20 6b 65 79 62 6f 61 72 |ecks the| keyboar|
|00000d60| 64 20 74 6f 20 73 65 65 | 20 77 68 61 74 20 6b 65 |d to see| what ke|
|00000d70| 79 20 69 73 20 62 65 69 | 6e 67 20 70 72 65 73 73 |y is bei|ng press|
|00000d80| 65 64 29 20 61 6e 64 20 | 70 72 6f 67 72 61 6d 6d |ed) and |programm|
|00000d90| 69 6e 67 20 70 72 69 6e | 63 69 70 6c 65 73 20 74 |ing prin|ciples t|
|00000da0| 68 61 74 20 63 61 6e 20 | 62 65 20 75 73 65 64 20 |hat can |be used |
|00000db0| 69 6e 20 79 6f 75 72 20 | 70 72 6f 67 72 61 6d 73 |in your |programs|
|00000dc0| 2e 20 20 20 48 65 72 65 | 2c 20 49 20 77 69 6c 6c |. Here|, I will|
|00000dd0| 20 70 72 6f 76 69 64 65 | 20 6a 75 73 74 20 61 6e | provide| just an|
|00000de0| 20 6f 76 65 72 76 69 65 | 77 20 6f 66 20 65 61 63 | overvie|w of eac|
|00000df0| 68 20 47 52 41 46 20 72 | 6f 75 74 69 6e 65 2e 0d |h GRAF r|outine..|
|00000e00| 0d 54 48 45 20 53 50 52 | 49 54 45 53 3a 20 20 56 |.THE SPR|ITES: V|
|00000e10| 69 72 74 75 61 6c 6c 79 | 20 61 6c 6c 20 70 72 6f |irtually| all pro|
|00000e20| 67 72 61 6d 73 20 75 73 | 69 6e 67 20 47 52 41 46 |grams us|ing GRAF|
|00000e30| 20 77 69 6c 6c 20 75 73 | 65 20 63 6f 6c 6f 72 20 | will us|e color |
|00000e40| 69 63 6f 6e 73 20 66 6f | 72 20 73 70 72 69 74 65 |icons fo|r sprite|
|00000e50| 73 20 28 63 69 63 6e 73 | 3b 20 75 73 65 20 52 65 |s (cicns|; use Re|
|00000e60| 73 45 64 69 74 3b 20 64 | 6f 6e 27 74 20 66 6f 72 |sEdit; d|on't for|
|00000e70| 67 65 74 20 74 6f 20 6d | 61 6b 65 20 6d 61 73 6b |get to m|ake mask|
|00000e80| 73 21 29 2e 20 20 54 68 | 6f 75 67 68 20 50 49 43 |s!). Th|ough PIC|
|00000e90| 54 20 73 70 72 69 74 65 | 73 20 61 72 65 20 73 75 |T sprite|s are su|
|00000ea0| 70 70 6f 72 74 65 64 20 | 74 6f 20 73 6f 6d 65 20 |pported |to some |
|00000eb0| 64 65 67 72 65 65 2c 20 | 49 20 77 69 6c 6c 20 6e |degree, |I will n|
|00000ec0| 6f 74 20 65 78 70 6c 61 | 69 6e 20 74 68 65 6d 20 |ot expla|in them |
|00000ed0| 69 6e 20 74 68 69 73 20 | 6d 61 6e 75 61 6c 2c 20 |in this |manual, |
|00000ee0| 61 6e 64 20 79 6f 75 20 | 77 69 6c 6c 20 68 61 76 |and you |will hav|
|00000ef0| 65 20 74 6f 20 67 6f 20 | 69 6e 74 6f 20 74 68 65 |e to go |into the|
|00000f00| 20 47 52 41 46 20 63 6f | 64 65 20 74 6f 20 66 69 | GRAF co|de to fi|
|00000f10| 6e 64 20 74 68 65 20 63 | 6f 6d 6d 61 6e 64 73 20 |nd the c|ommands |
|00000f20| 61 6e 64 20 73 65 74 74 | 69 6e 67 73 20 66 6f 72 |and sett|ings for|
|00000f30| 20 50 49 43 54 20 75 73 | 65 2e 20 20 49 20 77 61 | PICT us|e. I wa|
|00000f40| 72 6e 20 79 6f 75 20 68 | 6f 77 65 76 65 72 2c 20 |rn you h|owever, |
|00000f50| 50 49 43 54 20 75 73 61 | 67 65 20 69 73 20 70 72 |PICT usa|ge is pr|
|00000f60| 69 6d 69 74 69 76 65 2e | 20 20 49 66 20 73 75 70 |imitive.| If sup|
|00000f70| 70 6f 72 74 20 66 6f 72 | 20 47 52 41 46 20 69 73 |port for| GRAF is|
|00000f80| 20 68 69 67 68 2c 20 49 | 20 6d 61 79 20 66 69 78 | high, I| may fix|
|00000f90| 20 75 70 20 50 49 43 54 | 20 73 70 72 69 74 65 73 | up PICT| sprites|
|00000fa0| 20 69 6e 20 73 6f 6d 65 | 20 66 75 74 75 72 65 20 | in some| future |
|00000fb0| 76 65 72 73 69 6f 6e 2e | 20 20 4e 4f 54 45 3a 20 |version.| NOTE: |
|00000fc0| 47 52 41 46 20 64 6f 65 | 73 6e 27 74 20 73 75 70 |GRAF doe|sn't sup|
|00000fd0| 70 6f 72 74 20 6d 6f 72 | 65 20 74 68 61 6e 20 31 |port mor|e than 1|
|00000fe0| 30 30 20 73 70 72 69 74 | 65 73 20 61 74 20 61 20 |00 sprit|es at a |
|00000ff0| 74 69 6d 65 3b 20 64 6f | 6e 27 74 20 61 6c 6c 6f |time; do|n't allo|
|00001000| 77 20 79 6f 75 72 20 70 | 72 6f 67 72 61 6d 20 74 |w your p|rogram t|
|00001010| 6f 20 75 73 65 20 6d 6f | 72 65 20 74 68 61 6e 20 |o use mo|re than |
|00001020| 31 30 30 21 21 21 21 21 | 2e 0d 0d 4f 54 48 45 52 |100!!!!!|...OTHER|
|00001030| 20 52 45 51 55 49 52 45 | 4d 45 4e 54 53 3a 20 20 | REQUIRE|MENTS: |
|00001040| 54 68 65 20 47 52 41 46 | 20 75 6e 69 74 20 72 65 |The GRAF| unit re|
|00001050| 71 75 69 72 65 73 20 33 | 32 2d 62 69 74 20 61 64 |quires 3|2-bit ad|
|00001060| 64 72 65 73 73 69 6e 67 | 2c 20 38 2d 62 69 74 20 |dressing|, 8-bit |
|00001070| 63 6f 6c 6f 72 2c 20 61 | 6e 64 20 74 68 65 20 6d |color, a|nd the m|
|00001080| 69 6e 69 6d 75 6d 20 52 | 41 4d 20 72 65 71 75 69 |inimum R|AM requi|
|00001090| 72 65 6d 65 6e 74 20 66 | 6f 72 20 70 72 6f 67 72 |rement f|or progr|
|000010a0| 61 6d 73 20 75 73 69 6e | 67 20 47 52 41 46 20 69 |ams usin|g GRAF i|
|000010b0| 73 20 61 62 6f 75 74 20 | 31 20 4d 42 2e 20 20 49 |s about |1 MB. I|
|000010c0| 46 20 59 4f 55 20 44 4f | 4e 27 54 20 47 49 56 45 |F YOU DO|N'T GIVE|
|000010d0| 20 49 54 20 45 4e 4f 55 | 47 48 20 4d 45 4d 4f 52 | IT ENOU|GH MEMOR|
|000010e0| 59 2c 20 49 54 20 57 49 | 4c 4c 20 43 52 41 53 48 |Y, IT WI|LL CRASH|
|000010f0| 2e 20 20 49 74 27 73 20 | 6e 6f 20 62 69 67 20 64 |. It's |no big d|
|00001100| 65 61 6c 20 74 68 6f 75 | 67 68 2e 20 4a 75 73 74 |eal thou|gh. Just|
|00001110| 20 72 65 73 74 61 72 74 | 20 79 6f 75 72 20 63 6f | restart| your co|
|00001120| 6d 70 75 74 65 72 2e 20 | 20 31 20 4d 42 20 69 73 |mputer. | 1 MB is|
|00001130| 20 65 6e 6f 75 67 68 20 | 66 6f 72 20 6d 6f 73 74 | enough |for most|
|00001140| 20 73 6d 61 6c 6c 20 74 | 6f 20 6d 65 64 69 75 6d | small t|o medium|
|00001150| 20 70 72 6f 67 72 61 6d | 73 2c 20 62 75 74 20 66 | program|s, but f|
|00001160| 6f 72 20 6c 6f 6e 67 20 | 70 72 6f 67 72 61 6d 73 |or long |programs|
|00001170| 2c 20 47 52 41 46 20 6d | 61 79 20 6e 65 65 64 20 |, GRAF m|ay need |
|00001180| 61 73 20 6d 75 63 68 20 | 61 73 20 33 20 4d 42 2e |as much |as 3 MB.|
|00001190| 0d 0d 47 52 41 46 20 43 | 6f 6d 6d 61 6e 64 73 3a |..GRAF C|ommands:|
|000011a0| 0d 0d 20 70 72 6f 63 65 | 64 75 72 65 20 47 52 41 |.. proce|dure GRA|
|000011b0| 46 49 6e 69 74 20 28 70 | 69 63 74 49 44 2c 20 78 |FInit (p|ictID, x|
|000011c0| 73 69 7a 65 2c 20 79 73 | 69 7a 65 3a 20 69 6e 74 |size, ys|ize: int|
|000011d0| 65 67 65 72 29 3b 0d 0d | 54 68 69 73 20 70 72 6f |eger);..|This pro|
|000011e0| 63 65 64 75 72 65 20 73 | 68 6f 75 6c 64 20 62 65 |cedure s|hould be|
|000011f0| 20 63 61 6c 6c 65 64 20 | 61 74 20 74 68 65 20 62 | called |at the b|
|00001200| 65 67 69 6e 6e 69 6e 67 | 20 6f 66 20 65 76 65 72 |eginning| of ever|
|00001210| 79 20 70 72 6f 67 72 61 | 6d 2e 20 41 73 20 69 74 |y progra|m. As it|
|00001220| 73 20 6e 61 6d 65 20 69 | 6d 70 6c 69 65 73 2c 20 |s name i|mplies, |
|00001230| 69 74 20 69 6e 69 74 69 | 61 6c 69 7a 65 73 20 61 |it initi|alizes a|
|00001240| 6c 6c 20 73 65 74 74 69 | 6e 67 73 2c 20 67 72 61 |ll setti|ngs, gra|
|00001250| 70 68 69 63 73 20 77 6f | 72 6c 64 73 2c 20 61 6e |phics wo|rlds, an|
|00001260| 64 20 6f 74 68 65 72 20 | 74 68 69 6e 67 73 20 6e |d other |things n|
|00001270| 65 65 64 65 64 2e 20 20 | 70 69 63 74 49 44 20 73 |eeded. |pictID s|
|00001280| 68 6f 75 6c 64 20 62 65 | 20 74 68 65 20 49 44 20 |hould be| the ID |
|00001290| 6e 75 6d 62 65 72 20 6f | 66 20 74 68 65 20 50 49 |number o|f the PI|
|000012a0| 43 54 20 74 6f 20 75 73 | 65 20 66 6f 72 20 74 68 |CT to us|e for th|
|000012b0| 65 20 62 61 63 6b 67 72 | 6f 75 6e 64 2e 20 20 78 |e backgr|ound. x|
|000012c0| 73 69 7a 65 20 61 6e 64 | 20 79 73 69 7a 65 20 73 |size and| ysize s|
|000012d0| 68 6f 75 6c 64 20 62 65 | 20 74 68 65 20 68 6f 72 |hould be| the hor|
|000012e0| 69 7a 6f 6e 74 61 6c 20 | 61 6e 64 20 76 65 72 74 |izontal |and vert|
|000012f0| 69 63 61 6c 20 6e 75 6d | 62 65 72 20 6f 66 20 70 |ical num|ber of p|
|00001300| 69 78 65 6c 73 20 74 6f | 20 75 73 65 20 66 6f 72 |ixels to| use for|
|00001310| 20 74 68 65 20 6d 61 69 | 6e 20 64 72 61 77 69 6e | the mai|n drawin|
|00001320| 67 20 77 69 6e 64 6f 77 | 2e 20 20 47 52 41 46 20 |g window|. GRAF |
|00001330| 77 69 6c 6c 20 61 75 74 | 6f 6d 61 74 69 63 6c 79 |will aut|omaticly|
|00001340| 20 63 65 6e 74 65 72 20 | 74 68 65 20 64 72 61 77 | center |the draw|
|00001350| 69 6e 67 20 77 69 6e 64 | 6f 77 2c 20 61 6e 64 20 |ing wind|ow, and |
|00001360| 77 69 6c 6c 20 61 73 75 | 6d 65 20 74 68 65 20 73 |will asu|me the s|
|00001370| 63 72 65 65 6e 20 73 69 | 7a 65 20 69 73 20 36 34 |creen si|ze is 64|
|00001380| 30 20 62 79 20 34 38 30 | 2e 20 20 59 6f 75 20 63 |0 by 480|. You c|
|00001390| 61 6e 20 67 6f 20 69 6e | 74 6f 20 74 68 65 20 63 |an go in|to the c|
|000013a0| 6f 64 65 20 74 6f 20 63 | 68 61 6e 67 65 20 74 68 |ode to c|hange th|
|000013b0| 69 73 20 73 69 7a 65 2c | 20 68 6f 77 65 76 65 72 |is size,| however|
|000013c0| 2e 0d 0d 70 72 6f 63 65 | 64 75 72 65 20 73 65 74 |...proce|dure set|
|000013d0| 73 6f 72 74 73 74 79 6c | 65 20 28 74 68 65 6f 6e |sortstyl|e (theon|
|000013e0| 65 3a 20 69 6e 74 65 67 | 65 72 29 3b 0d 0d 49 66 |e: integ|er);..If|
|000013f0| 20 79 6f 75 20 64 65 73 | 69 72 65 20 74 6f 20 63 | you des|ire to c|
|00001400| 68 61 6e 67 65 20 74 68 | 65 20 73 6f 72 74 69 6e |hange th|e sortin|
|00001410| 67 20 73 74 79 6c 65 2c | 20 74 68 69 73 20 63 6f |g style,| this co|
|00001420| 6d 6d 61 6e 64 20 73 68 | 6f 75 6c 64 20 62 65 20 |mmand sh|ould be |
|00001430| 75 73 65 64 2c 20 61 6e | 64 20 73 68 6f 75 6c 64 |used, an|d should|
|00001440| 20 62 65 20 63 61 6c 6c | 65 64 20 73 6f 6f 6e 20 | be call|ed soon |
|00001450| 61 66 74 65 72 20 47 52 | 41 46 49 6e 69 74 2e 20 |after GR|AFInit. |
|00001460| 20 49 66 20 63 61 6c 6c | 65 64 20 62 65 66 6f 72 | If call|ed befor|
|00001470| 65 20 47 52 41 46 49 6e | 69 74 2c 20 69 74 20 77 |e GRAFIn|it, it w|
|00001480| 69 6c 6c 20 6e 6f 74 20 | 77 6f 72 6b 2e 20 54 68 |ill not |work. Th|
|00001490| 65 20 64 65 66 61 6c 74 | 20 73 65 74 74 69 6e 67 |e defalt| setting|
|000014a0| 20 66 6f 72 20 74 68 65 | 20 73 70 72 69 74 65 20 | for the| sprite |
|000014b0| 73 6f 72 74 69 6e 67 20 | 73 74 79 6c 65 20 69 73 |sorting |style is|
|000014c0| 20 31 2c 20 77 68 69 63 | 68 20 6d 65 61 6e 73 20 | 1, whic|h means |
|000014d0| 6e 6f 20 73 6f 72 74 69 | 6e 67 20 77 69 6c 6c 20 |no sorti|ng will |
|000014e0| 62 65 20 64 6f 6e 65 2e | 20 20 49 66 20 79 6f 75 |be done.| If you|
|000014f0| 20 73 70 65 63 69 66 79 | 20 74 68 65 6f 6e 65 20 | specify| theone |
|00001500| 74 6f 20 62 65 20 32 20 | 7b 20 69 2e 65 2e 20 20 |to be 2 |{ i.e. |
|00001510| 73 65 74 73 6f 72 74 73 | 74 79 6c 65 28 32 29 20 |setsorts|tyle(2) |
|00001520| 20 7d 20 73 70 72 69 74 | 65 73 28 6f 62 6a 65 63 | } sprit|es(objec|
|00001530| 74 73 29 20 77 68 69 63 | 68 20 61 72 65 20 66 75 |ts) whic|h are fu|
|00001540| 72 74 68 65 72 20 75 70 | 20 74 68 65 20 73 63 72 |rther up| the scr|
|00001550| 65 65 6e 20 77 69 6c 6c | 20 62 65 20 64 72 61 77 |een will| be draw|
|00001560| 6e 20 66 75 72 74 68 65 | 72 20 62 61 63 6b 2c 20 |n furthe|r back, |
|00001570| 67 69 76 69 6e 67 20 74 | 68 65 20 61 70 70 65 61 |giving t|he appea|
|00001580| 72 61 6e 63 65 20 6f 66 | 20 62 65 69 6e 67 20 62 |rance of| being b|
|00001590| 65 68 69 6e 64 20 74 68 | 65 20 73 70 72 69 74 65 |ehind th|e sprite|
|000015a0| 73 20 66 75 72 74 68 65 | 72 20 64 6f 77 6e 20 74 |s furthe|r down t|
|000015b0| 68 65 20 73 63 72 65 65 | 6e 2e 20 20 54 6f 20 61 |he scree|n. To a|
|000015c0| 63 6f 6d 70 6c 69 73 68 | 20 74 68 69 73 2c 20 6f |complish| this, o|
|000015d0| 6e 65 20 70 61 73 73 20 | 6f 66 20 62 75 62 62 6c |ne pass |of bubbl|
|000015e0| 65 20 73 6f 72 74 20 69 | 73 20 64 6f 6e 65 20 65 |e sort i|s done e|
|000015f0| 61 63 68 20 66 72 61 6d | 65 2e 20 54 68 61 74 20 |ach fram|e. That |
|00001600| 6d 65 61 6e 73 20 74 68 | 61 74 20 69 66 20 61 20 |means th|at if a |
|00001610| 73 70 72 69 74 65 20 69 | 73 20 63 72 65 61 74 65 |sprite i|s create|
|00001620| 64 20 61 62 6f 76 65 20 | 61 6e 64 20 6f 76 65 72 |d above |and over|
|00001630| 6c 61 70 70 69 6e 67 20 | 31 30 20 6f 74 68 65 72 |lapping |10 other|
|00001640| 20 73 70 72 69 74 65 73 | 2c 20 69 74 20 77 69 6c | sprites|, it wil|
|00001650| 6c 20 69 6e 69 74 69 61 | 6c 6c 79 20 62 65 20 64 |l initia|lly be d|
|00001660| 72 61 77 6e 20 69 6e 20 | 66 72 6f 6e 74 20 6f 66 |rawn in |front of|
|00001670| 20 74 68 65 6d 2c 20 61 | 6e 64 20 69 74 20 77 69 | them, a|nd it wi|
|00001680| 6c 6c 20 74 61 6b 65 20 | 69 74 20 74 65 6e 20 66 |ll take |it ten f|
|00001690| 72 61 6d 65 73 20 74 6f | 20 77 6f 72 6b 20 69 74 |rames to| work it|
|000016a0| 73 20 77 61 79 20 74 6f | 20 74 68 65 20 62 61 63 |s way to| the bac|
|000016b0| 6b 2e 0d 0d 20 70 72 6f | 63 65 64 75 72 65 20 73 |k... pro|cedure s|
|000016c0| 65 74 63 6f 6c 6c 69 73 | 69 6f 6e 68 61 6e 64 6c |etcollis|ionhandl|
|000016d0| 69 6e 67 20 28 74 68 65 | 6f 6e 65 3a 20 69 6e 74 |ing (the|one: int|
|000016e0| 65 67 65 72 29 3b 0d 0d | 54 68 65 20 64 65 66 61 |eger);..|The defa|
|000016f0| 6c 74 20 66 6f 72 20 74 | 68 65 20 63 6f 6c 6c 69 |lt for t|he colli|
|00001700| 73 69 6f 6e 20 68 61 6e | 64 6c 69 6e 67 20 69 73 |sion han|dling is|
|00001710| 20 31 2c 20 77 68 69 63 | 68 20 6d 65 61 6e 73 20 | 1, whic|h means |
|00001720| 74 68 61 74 20 69 6e 20 | 74 68 65 20 63 61 73 65 |that in |the case|
|00001730| 20 6f 66 20 61 20 63 6f | 6c 6c 69 73 69 6f 6e 20 | of a co|llision |
|00001740| 62 65 74 77 65 65 6e 20 | 74 77 6f 20 73 70 72 69 |between |two spri|
|00001750| 74 65 73 2c 20 74 68 65 | 20 63 6f 6c 6c 69 73 69 |tes, the| collisi|
|00001760| 6f 6e 74 61 73 6b 73 28 | 65 78 70 6c 61 69 6e 65 |ontasks(|explaine|
|00001770| 64 20 6c 61 74 65 72 29 | 20 6f 66 20 62 6f 74 68 |d later)| of both|
|00001780| 20 73 70 72 69 74 65 73 | 20 77 69 6c 6c 20 62 65 | sprites| will be|
|00001790| 20 63 61 6c 6c 65 64 2e | 20 20 59 6f 75 20 6d 69 | called.| You mi|
|000017a0| 67 68 74 20 77 61 6e 74 | 20 74 6f 20 75 73 65 20 |ght want| to use |
|000017b0| 74 68 69 73 20 70 72 6f | 63 65 64 75 72 65 20 74 |this pro|cedure t|
|000017c0| 6f 20 73 65 74 20 69 74 | 20 74 6f 20 32 20 69 66 |o set it| to 2 if|
|000017d0| 20 79 6f 75 20 68 61 76 | 65 20 6d 61 6e 79 20 69 | you hav|e many i|
|000017e0| 64 65 6e 74 69 63 61 6c | 20 73 70 72 69 74 65 73 |dentical| sprites|
|000017f0| 20 74 68 61 74 20 61 6c | 6c 20 61 63 74 20 74 68 | that al|l act th|
|00001800| 65 20 73 61 6d 65 20 77 | 61 79 28 20 6c 69 6b 65 |e same w|ay( like|
|00001810| 20 74 68 65 20 74 77 6f | 20 72 6f 63 6b 65 74 73 | the two| rockets|
|00001820| 20 69 6e 20 47 52 41 46 | 2e 43 6f 6c 6c 69 73 69 | in GRAF|.Collisi|
|00001830| 6f 6e 73 29 2e 20 20 49 | 66 20 69 74 20 69 73 20 |ons). I|f it is |
|00001840| 73 65 74 20 74 6f 20 32 | 2c 20 6f 6e 6c 79 20 6f |set to 2|, only o|
|00001850| 6e 65 20 6f 66 20 74 68 | 65 20 63 6f 6c 6c 69 73 |ne of th|e collis|
|00001860| 69 6f 6e 74 61 73 6b 73 | 20 66 6f 72 20 74 68 65 |iontasks| for the|
|00001870| 20 74 77 6f 20 73 70 72 | 69 74 65 73 20 74 68 61 | two spr|ites tha|
|00001880| 74 20 63 6f 6c 6c 69 64 | 65 64 20 77 69 6c 6c 20 |t collid|ed will |
|00001890| 62 65 20 63 61 6c 6c 65 | 64 2e 0d 0d 70 72 6f 63 |be calle|d...proc|
|000018a0| 65 64 75 72 65 20 75 70 | 64 61 74 65 77 68 6f 6c |edure up|datewhol|
|000018b0| 65 73 63 72 6e 3b 0d 0d | 43 6f 70 69 65 73 20 6a |escrn;..|Copies j|
|000018c0| 75 73 74 20 74 68 65 20 | 62 61 63 6b 67 72 6f 75 |ust the |backgrou|
|000018d0| 6e 64 2c 20 6e 6f 74 20 | 61 6e 79 20 73 70 72 69 |nd, not |any spri|
|000018e0| 74 65 73 20 74 68 61 74 | 20 6d 61 79 20 65 78 69 |tes that| may exi|
|000018f0| 73 74 2c 20 74 6f 20 74 | 68 65 20 64 72 61 77 69 |st, to t|he drawi|
|00001900| 6e 67 20 73 63 72 65 65 | 6e 2e 0d 0d 20 70 72 6f |ng scree|n... pro|
|00001910| 63 65 64 75 72 65 20 75 | 70 64 61 74 65 74 68 65 |cedure u|pdatethe|
|00001920| 73 63 72 65 65 6e 3b 0d | 0d 43 6f 70 69 65 73 20 |screen;.|.Copies |
|00001930| 74 68 65 20 62 61 63 6b | 67 72 6f 75 6e 64 2c 20 |the back|ground, |
|00001940| 61 6e 64 20 61 6e 79 20 | 73 70 72 69 74 65 73 20 |and any |sprites |
|00001950| 74 68 61 74 20 6d 61 79 | 20 65 78 69 73 74 2c 20 |that may| exist, |
|00001960| 74 6f 20 74 68 65 20 64 | 72 61 77 69 6e 67 20 73 |to the d|rawing s|
|00001970| 63 72 65 65 6e 2e 0d 0d | 70 72 6f 63 65 64 75 72 |creen...|procedur|
|00001980| 65 20 66 72 65 73 68 62 | 61 63 6b 67 72 6f 75 6e |e freshb|ackgroun|
|00001990| 64 20 28 70 69 63 74 49 | 44 3a 20 69 6e 74 65 67 |d (pictI|D: integ|
|000019a0| 65 72 29 3b 0d 0d 43 72 | 65 61 74 65 73 20 61 20 |er);..Cr|eates a |
|000019b0| 6e 65 77 20 62 61 63 6b | 67 72 6f 75 6e 64 20 75 |new back|ground u|
|000019c0| 73 69 6e 67 20 74 68 65 | 20 70 69 63 74 49 44 2e |sing the| pictID.|
|000019d0| 20 55 73 65 20 74 68 69 | 73 20 69 66 20 79 6f 75 | Use thi|s if you|
|000019e0| 20 77 61 6e 74 20 74 6f | 20 63 68 61 6e 67 65 20 | want to| change |
|000019f0| 74 68 65 20 62 61 63 6b | 67 72 6f 75 6e 64 20 61 |the back|ground a|
|00001a00| 66 74 65 72 20 69 6e 69 | 74 69 61 6c 69 7a 69 6e |fter ini|tializin|
|00001a10| 67 2e 0d 0d 20 66 75 6e | 63 74 69 6f 6e 20 4e 65 |g... fun|ction Ne|
|00001a20| 77 46 61 63 65 20 28 6e | 72 65 73 6e 75 6d 3a 20 |wFace (n|resnum: |
|00001a30| 69 6e 74 65 67 65 72 3b | 20 74 68 65 73 69 7a 65 |integer;| thesize|
|00001a40| 2c 20 74 68 65 63 6f 6c | 6c 69 73 69 6f 6e 3a 20 |, thecol|lision: |
|00001a50| 72 65 63 74 29 3a 20 46 | 61 63 65 3b 0d 0d 41 20 |rect): F|ace;..A |
|00001a60| 66 61 63 65 20 69 73 20 | 61 20 72 65 63 6f 72 64 |face is |a record|
|00001a70| 20 49 20 63 72 65 61 74 | 65 64 20 74 6f 20 68 6f | I creat|ed to ho|
|00001a80| 6c 64 20 61 6c 6c 20 74 | 68 65 20 69 6e 66 6f 72 |ld all t|he infor|
|00001a90| 6d 61 74 69 6f 6e 20 61 | 62 6f 75 74 20 68 6f 77 |mation a|bout how|
|00001aa0| 20 61 20 73 70 72 69 74 | 65 20 73 68 6f 75 6c 64 | a sprit|e should|
|00001ab0| 20 6c 6f 6f 6b 2e 20 20 | 50 75 74 20 74 68 69 73 | look. |Put this|
|00001ac0| 20 69 6e 66 6f 72 6d 61 | 74 69 6f 6e 20 69 6e 74 | informa|tion int|
|00001ad0| 6f 20 61 20 66 61 63 65 | 20 75 73 69 6e 67 20 74 |o a face| using t|
|00001ae0| 68 69 73 20 66 75 6e 63 | 74 69 6f 6e 2e 20 20 4e |his func|tion. N|
|00001af0| 72 65 73 6e 75 6d 20 69 | 73 20 74 68 65 20 63 69 |resnum i|s the ci|
|00001b00| 63 6e 20 72 65 73 6f 75 | 72 63 65 20 6e 75 6d 62 |cn resou|rce numb|
|00001b10| 65 72 20 6f 66 20 74 68 | 65 20 63 69 63 6e 20 79 |er of th|e cicn y|
|00001b20| 6f 75 20 77 61 6e 74 20 | 74 68 69 73 20 66 61 63 |ou want |this fac|
|00001b30| 65 20 74 6f 20 75 73 65 | 2e 20 20 54 68 65 73 69 |e to use|. Thesi|
|00001b40| 7a 65 20 69 73 20 74 68 | 65 20 73 69 7a 65 28 61 |ze is th|e size(a|
|00001b50| 20 72 65 63 74 29 20 74 | 68 65 20 73 70 72 69 74 | rect) t|he sprit|
|00001b60| 65 20 73 68 6f 75 6c 64 | 20 62 65 20 6f 6e 20 74 |e should| be on t|
|00001b70| 68 65 20 73 63 72 65 65 | 6e 2e 20 20 59 6f 75 20 |he scree|n. You |
|00001b80| 63 61 6e 20 6d 61 6b 65 | 20 74 68 65 73 69 7a 65 |can make| thesize|
|00001b90| 20 62 69 67 67 65 72 20 | 74 68 61 6e 20 74 68 65 | bigger |than the|
|00001ba0| 20 61 63 74 75 61 6c 20 | 73 69 7a 65 20 6f 66 20 | actual |size of |
|00001bb0| 74 68 65 20 73 70 72 69 | 74 65 2c 20 74 6f 20 73 |the spri|te, to s|
|00001bc0| 63 61 6c 65 20 74 68 65 | 20 73 70 72 69 74 65 20 |cale the| sprite |
|00001bd0| 62 69 67 67 65 72 20 6f | 72 20 73 6d 61 6c 6c 65 |bigger o|r smalle|
|00001be0| 72 2e 20 20 47 52 41 46 | 2e 41 72 63 61 64 65 20 |r. GRAF|.Arcade |
|00001bf0| 64 6f 65 73 20 74 68 69 | 73 2e 20 20 54 68 65 63 |does thi|s. Thec|
|00001c00| 6f 6c 6c 69 73 69 6f 6e | 20 69 73 20 74 68 65 20 |ollision| is the |
|00001c10| 72 65 63 74 20 73 69 7a | 65 20 74 6f 20 75 73 65 |rect siz|e to use|
|00001c20| 20 77 68 65 6e 20 47 52 | 41 46 20 74 65 73 74 73 | when GR|AF tests|
|00001c30| 20 66 6f 72 20 63 6f 6c | 6c 69 73 69 6f 6e 73 20 | for col|lisions |
|00001c40| 62 65 74 77 65 65 6e 20 | 73 70 72 69 74 65 73 2e |between |sprites.|
|00001c50| 20 20 56 65 72 79 20 6f | 66 74 65 6e 20 79 6f 75 | Very o|ften you|
|00001c60| 20 77 69 6c 6c 20 77 61 | 6e 74 20 74 68 65 20 63 | will wa|nt the c|
|00001c70| 6f 6c 6c 69 73 69 6f 6e | 72 65 63 74 20 74 6f 20 |ollision|rect to |
|00001c80| 62 65 20 73 6d 61 6c 6c | 65 72 20 74 68 61 6e 20 |be small|er than |
|00001c90| 74 68 65 20 61 63 74 75 | 61 6c 20 73 69 7a 65 20 |the actu|al size |
|00001ca0| 6f 66 20 74 68 65 20 73 | 70 72 69 74 65 2e 20 20 |of the s|prite. |
|00001cb0| 43 68 65 63 6b 20 6f 75 | 74 20 74 68 65 20 47 52 |Check ou|t the GR|
|00001cc0| 41 46 2e 41 72 63 61 64 | 65 20 64 65 6d 6f 20 74 |AF.Arcad|e demo t|
|00001cd0| 6f 20 73 65 65 20 68 6f | 77 20 74 68 69 73 20 69 |o see ho|w this i|
|00001ce0| 73 20 64 6f 6e 65 2e 0d | 0d 66 75 6e 63 74 69 6f |s done..|.functio|
|00001cf0| 6e 20 4e 65 77 53 70 72 | 69 74 65 20 28 74 68 65 |n NewSpr|ite (the|
|00001d00| 6b 69 6e 64 2c 20 68 70 | 6f 73 2c 20 76 70 6f 73 |kind, hp|os, vpos|
|00001d10| 2c 20 74 68 65 6c 61 79 | 65 72 3a 20 69 6e 74 65 |, thelay|er: inte|
|00001d20| 67 65 72 3b 20 74 68 61 | 74 66 61 63 65 3a 20 66 |ger; tha|tface: f|
|00001d30| 61 63 65 3b 20 74 68 65 | 74 61 73 6b 2c 20 74 68 |ace; the|task, th|
|00001d40| 65 68 69 74 54 61 73 6b | 2c 20 73 65 74 75 70 74 |ehitTask|, setupt|
|00001d50| 61 73 6b 3a 20 50 72 6f | 63 50 74 72 29 3a 20 69 |ask: Pro|cPtr): i|
|00001d60| 6e 74 65 67 65 72 3b 0d | 0d 4e 65 77 53 70 72 69 |nteger;.|.NewSpri|
|00001d70| 74 65 20 63 72 65 61 74 | 65 73 20 61 20 6e 65 77 |te creat|es a new|
|00001d80| 20 6f 62 6a 65 63 74 2c | 20 77 68 69 63 68 20 77 | object,| which w|
|00001d90| 69 6c 6c 20 74 68 65 6e | 20 62 65 20 61 6e 69 6d |ill then| be anim|
|00001da0| 61 74 65 64 20 62 79 20 | 52 75 6e 47 52 41 46 28 |ated by |RunGRAF(|
|00001db0| 6e 65 78 74 20 72 6f 75 | 74 69 6e 65 29 2e 20 20 |next rou|tine). |
|00001dc0| 54 68 65 6b 69 6e 64 20 | 63 61 6e 20 62 65 20 61 |Thekind |can be a|
|00001dd0| 6e 79 20 6e 75 6d 62 65 | 72 20 79 6f 75 20 6c 69 |ny numbe|r you li|
|00001de0| 6b 65 2e 20 20 4f 6e 6c | 79 20 73 70 72 69 74 65 |ke. Onl|y sprite|
|00001df0| 73 20 77 69 74 68 20 64 | 69 66 66 65 72 65 6e 74 |s with d|ifferent|
|00001e00| 20 6b 69 6e 64 73 20 63 | 61 6e 20 63 6f 6c 6c 69 | kinds c|an colli|
|00001e10| 64 65 2e 20 53 6f 2c 20 | 74 6f 20 68 61 76 65 20 |de. So, |to have |
|00001e20| 74 77 6f 20 6f 62 6a 65 | 63 74 73 20 6e 65 76 65 |two obje|cts neve|
|00001e30| 72 20 63 6f 6c 6c 69 64 | 65 2c 20 73 65 74 20 74 |r collid|e, set t|
|00001e40| 68 65 20 6b 69 6e 64 20 | 6f 66 20 62 6f 74 68 20 |he kind |of both |
|00001e50| 6f 66 20 74 68 65 6d 20 | 74 6f 20 74 68 65 20 73 |of them |to the s|
|00001e60| 61 6d 65 20 6e 75 6d 62 | 65 72 2e 20 20 48 70 6f |ame numb|er. Hpo|
|00001e70| 73 20 61 6e 64 20 76 70 | 6f 73 20 61 72 65 20 74 |s and vp|os are t|
|00001e80| 68 65 20 68 6f 72 69 7a | 6f 6e 74 61 6c 20 61 6e |he horiz|ontal an|
|00001e90| 64 20 76 65 72 74 69 63 | 61 6c 20 73 74 61 72 74 |d vertic|al start|
|00001ea0| 69 6e 67 20 70 6f 69 6e | 74 73 20 6f 66 20 74 68 |ing poin|ts of th|
|00001eb0| 65 20 75 70 70 65 72 20 | 6c 65 66 74 2d 68 61 6e |e upper |left-han|
|00001ec0| 64 20 63 6f 72 6e 65 72 | 20 6f 66 20 74 68 65 20 |d corner| of the |
|00001ed0| 73 70 72 69 74 65 2e 20 | 20 54 68 65 6c 61 79 65 |sprite. | Thelaye|
|00001ee0| 72 20 69 73 20 61 20 6e | 6f 74 20 79 65 74 20 69 |r is a n|ot yet i|
|00001ef0| 6d 70 6c 65 6d 65 6e 74 | 65 64 20 66 65 61 74 75 |mplement|ed featu|
|00001f00| 72 65 2c 20 73 6f 20 79 | 6f 75 20 63 61 6e 20 6a |re, so y|ou can j|
|00001f10| 75 73 74 20 73 65 74 20 | 74 68 69 73 20 74 6f 20 |ust set |this to |
|00001f20| 7a 65 72 6f 20 61 6c 6c | 20 74 68 65 20 74 69 6d |zero all| the tim|
|00001f30| 65 2e 20 20 54 68 61 74 | 66 61 63 65 20 69 73 20 |e. That|face is |
|00001f40| 74 68 65 20 66 61 63 65 | 20 79 6f 75 20 77 61 6e |the face| you wan|
|00001f50| 74 20 74 68 65 20 73 70 | 72 69 74 65 20 74 6f 20 |t the sp|rite to |
|00001f60| 68 61 76 65 2e 20 20 54 | 68 65 20 6e 65 78 74 20 |have. T|he next |
|00001f70| 74 68 72 65 65 20 76 61 | 72 69 61 62 6c 65 73 20 |three va|riables |
|00001f80| 74 6f 20 62 65 20 70 61 | 73 73 65 64 20 61 72 65 |to be pa|ssed are|
|00001f90| 20 70 72 6f 63 65 64 75 | 72 65 20 70 6f 69 6e 74 | procedu|re point|
|00001fa0| 65 72 73 2c 20 77 68 69 | 63 68 20 68 61 76 65 20 |ers, whi|ch have |
|00001fb0| 74 68 65 20 73 61 6d 65 | 20 6e 61 6d 65 20 61 73 |the same| name as|
|00001fc0| 20 74 68 65 20 70 72 6f | 63 65 64 75 72 65 20 74 | the pro|cedure t|
|00001fd0| 68 65 79 20 70 6f 69 6e | 74 20 74 6f 20 62 75 74 |hey poin|t to but|
|00001fe0| 20 68 61 76 65 20 61 20 | 40 20 73 79 6d 62 6f 6c | have a |@ symbol|
|00001ff0| 20 69 6e 20 66 72 6f 6e | 74 20 6f 66 20 74 68 65 | in fron|t of the|
|00002000| 6d 2e 20 20 53 6f 2c 20 | 69 66 20 49 20 68 61 64 |m. So, |if I had|
|00002010| 20 61 20 70 72 6f 63 65 | 64 75 72 65 20 63 61 6c | a proce|dure cal|
|00002020| 6c 65 64 20 41 54 61 73 | 6b 2c 20 69 74 73 20 70 |led ATas|k, its p|
|00002030| 72 6f 63 65 64 75 72 65 | 20 70 6f 69 6e 74 65 72 |rocedure| pointer|
|00002040| 20 77 6f 75 6c 64 20 62 | 65 20 40 41 54 61 73 6b | would b|e @ATask|
|00002050| 2e 20 20 52 75 6e 47 52 | 41 46 28 20 6e 65 78 74 |. RunGR|AF( next|
|00002060| 20 70 72 6f 63 65 64 75 | 72 65 29 20 69 73 20 63 | procedu|re) is c|
|00002070| 61 6c 6c 65 64 20 69 6e | 20 61 20 6c 6f 6f 70 20 |alled in| a loop |
|00002080| 61 6c 6c 20 64 75 72 69 | 6e 67 20 74 68 65 20 61 |all duri|ng the a|
|00002090| 6e 69 6d 61 74 69 6f 6e | 2c 20 62 65 63 61 75 73 |nimation|, becaus|
|000020a0| 65 20 61 6c 6c 20 6f 66 | 20 74 68 65 20 61 6e 69 |e all of| the ani|
|000020b0| 6d 61 74 69 6f 6e 20 72 | 6f 75 74 69 6e 65 73 20 |mation r|outines |
|000020c0| 61 72 65 20 69 6e 20 52 | 75 6e 47 52 41 46 2e 20 |are in R|unGRAF. |
|000020d0| 20 52 75 6e 47 52 41 46 | 20 63 61 6c 6c 73 20 74 | RunGRAF| calls t|
|000020e0| 68 65 20 74 68 65 74 61 | 73 6b 20 70 72 6f 63 65 |he theta|sk proce|
|000020f0| 64 75 72 65 20 6f 6e 63 | 65 20 65 76 65 72 79 20 |dure onc|e every |
|00002100| 66 72 61 6d 65 20 6f 66 | 20 74 68 65 20 61 6e 69 |frame of| the ani|
|00002110| 6d 61 74 69 6f 6e 2e 20 | 20 57 68 65 6e 20 74 68 |mation. | When th|
|00002120| 65 20 73 70 72 69 74 65 | 20 63 6f 6c 6c 69 64 65 |e sprite| collide|
|00002130| 73 20 77 69 74 68 20 61 | 6e 6f 74 68 65 72 20 6f |s with a|nother o|
|00002140| 62 6a 65 63 74 2c 20 52 | 75 6e 47 52 41 46 20 63 |bject, R|unGRAF c|
|00002150| 61 6c 6c 73 20 74 68 65 | 20 74 68 65 68 69 74 54 |alls the| thehitT|
|00002160| 61 73 6b 20 70 72 6f 63 | 65 64 75 72 65 2e 20 20 |ask proc|edure. |
|00002170| 54 68 65 20 66 75 6e 63 | 74 69 6f 6e 20 70 61 73 |The func|tion pas|
|00002180| 73 65 73 20 62 61 63 6b | 20 74 6f 20 74 68 65 20 |ses back| to the |
|00002190| 69 6e 74 65 67 65 72 20 | 76 61 72 69 61 62 6c 65 |integer |variable|
|000021a0| 20 74 68 65 20 6e 75 6d | 62 65 72 20 69 6e 20 74 | the num|ber in t|
|000021b0| 68 65 20 69 6e 74 65 72 | 6e 61 6c 20 61 72 72 61 |he inter|nal arra|
|000021c0| 79 20 6f 66 20 73 70 72 | 69 74 65 73 20 74 68 61 |y of spr|ites tha|
|000021d0| 74 20 74 68 65 20 6e 65 | 77 73 70 72 69 74 65 20 |t the ne|wsprite |
|000021e0| 63 61 6e 20 62 65 20 72 | 65 66 65 72 65 6e 63 65 |can be r|eference|
|000021f0| 64 20 77 69 74 68 2e 20 | 49 67 6e 6f 72 65 20 74 |d with. |Ignore t|
|00002200| 68 69 73 20 6e 75 6d 62 | 65 72 20 75 6e 6c 65 73 |his numb|er unles|
|00002210| 73 20 79 6f 75 20 72 65 | 61 6c 6c 79 20 6e 65 65 |s you re|ally nee|
|00002220| 64 20 69 74 2e 20 20 52 | 69 67 68 74 20 61 66 74 |d it. R|ight aft|
|00002230| 65 72 20 63 72 65 61 74 | 69 6e 67 20 74 68 65 20 |er creat|ing the |
|00002240| 73 70 72 69 74 65 2c 20 | 74 68 65 20 73 65 74 75 |sprite, |the setu|
|00002250| 70 74 61 73 6b 20 70 72 | 6f 63 65 64 75 72 65 20 |ptask pr|ocedure |
|00002260| 69 73 20 63 61 6c 6c 65 | 64 2e 20 53 6f 2c 20 61 |is calle|d. So, a|
|00002270| 20 74 79 70 69 63 61 6c | 20 73 70 72 69 74 65 20 | typical| sprite |
|00002280| 63 72 65 61 74 69 6f 6e | 20 63 61 6c 6c 20 77 6f |creation| call wo|
|00002290| 75 6c 64 20 67 6f 20 73 | 6f 6d 65 74 68 69 6e 67 |uld go s|omething|
|000022a0| 20 6c 69 6b 65 20 74 68 | 69 73 3a 20 74 65 6d 70 | like th|is: temp|
|000022b0| 3a 3d 4e 65 77 53 70 72 | 69 74 65 28 31 2c 35 30 |:=NewSpr|ite(1,50|
|000022c0| 2c 35 30 2c 30 2c 6d 79 | 66 61 63 65 2c 40 64 6f |,50,0,my|face,@do|
|000022d0| 69 74 54 61 73 6b 2c 40 | 68 69 74 69 74 54 61 73 |itTask,@|hititTas|
|000022e0| 6b 2c 40 73 65 74 54 68 | 65 57 68 6f 6c 65 54 68 |k,@setTh|eWholeTh|
|000022f0| 69 6e 67 55 70 29 2e 0d | 42 6f 74 68 20 74 68 65 |ingUp)..|Both the|
|00002300| 20 70 72 6f 63 65 64 75 | 72 65 20 66 6f 72 20 74 | procedu|re for t|
|00002310| 68 65 74 61 73 6b 20 61 | 6e 64 20 74 68 65 20 73 |hetask a|nd the s|
|00002320| 65 74 75 70 74 61 73 6b | 20 70 72 6f 63 65 64 75 |etuptask| procedu|
|00002330| 72 65 20 6d 75 73 74 20 | 68 61 76 65 20 74 68 69 |re must |have thi|
|00002340| 73 20 66 6f 72 6d 3a 20 | 70 72 6f 63 65 64 75 72 |s form: |procedur|
|00002350| 65 20 64 6f 74 68 65 74 | 61 73 6b 28 76 61 72 20 |e dothet|ask(var |
|00002360| 6d 65 3a 73 70 72 69 74 | 65 29 2e 20 20 57 68 65 |me:sprit|e). Whe|
|00002370| 6e 20 47 52 41 46 20 63 | 61 6c 6c 73 20 74 68 65 |n GRAF c|alls the|
|00002380| 73 65 20 70 72 6f 63 65 | 64 75 72 65 73 2c 20 69 |se proce|dures, i|
|00002390| 74 20 74 72 69 65 73 20 | 74 6f 20 70 61 73 73 20 |t tries |to pass |
|000023a0| 74 68 65 20 73 70 72 69 | 74 65 20 74 68 61 74 20 |the spri|te that |
|000023b0| 63 61 6c 6c 65 64 20 74 | 68 65 6d 20 74 6f 20 74 |called t|hem to t|
|000023c0| 68 65 20 70 72 6f 63 65 | 64 75 72 65 2c 20 73 6f |he proce|dure, so|
|000023d0| 20 79 6f 75 20 63 61 6e | 20 61 63 63 65 73 73 20 | you can| access |
|000023e0| 69 74 2e 20 20 4d 65 20 | 77 69 6c 6c 20 63 6f 6e |it. Me |will con|
|000023f0| 74 61 69 6e 20 74 68 65 | 20 73 70 72 69 74 65 20 |tain the| sprite |
|00002400| 74 68 61 74 20 63 61 6c | 6c 65 64 20 74 68 65 20 |that cal|led the |
|00002410| 70 72 6f 63 65 64 75 72 | 65 2e 20 20 46 6f 72 20 |procedur|e. For |
|00002420| 63 6f 6c 6c 69 73 69 6f | 6e 74 61 73 6b 20 70 72 |collisio|ntask pr|
|00002430| 6f 63 65 64 75 72 65 73 | 2c 20 74 68 65 79 20 6d |ocedures|, they m|
|00002440| 75 73 74 20 62 65 20 64 | 65 63 6c 61 72 65 64 20 |ust be d|eclared |
|00002450| 6c 69 6b 65 20 74 68 69 | 73 3a 20 20 70 72 6f 63 |like thi|s: proc|
|00002460| 65 64 75 72 65 20 44 6f | 63 6f 6c 6c 69 73 69 6f |edure Do|collisio|
|00002470| 6e 74 61 73 6b 28 76 61 | 72 20 6d 65 2c 68 69 6d |ntask(va|r me,him|
|00002480| 3a 73 70 72 69 74 65 29 | 2e 20 20 4d 65 20 69 73 |:sprite)|. Me is|
|00002490| 20 74 68 65 20 73 70 72 | 69 74 65 20 74 68 61 74 | the spr|ite that|
|000024a0| 20 63 61 6c 6c 65 64 20 | 74 68 65 20 63 6f 6c 6c | called |the coll|
|000024b0| 69 73 69 6f 6e 74 61 73 | 6b 2c 20 61 6e 64 20 68 |isiontas|k, and h|
|000024c0| 69 6d 20 69 73 20 74 68 | 65 20 73 70 72 69 74 65 |im is th|e sprite|
|000024d0| 20 69 74 20 63 6f 6c 6c | 69 64 65 64 20 77 69 74 | it coll|ided wit|
|000024e0| 68 2e 20 20 41 6c 6c 20 | 74 68 72 65 65 20 6f 66 |h. All |three of|
|000024f0| 20 74 68 65 20 70 72 6f | 63 65 64 75 72 65 73 20 | the pro|cedures |
|00002500| 70 61 73 73 65 64 20 74 | 6f 20 61 20 73 70 72 69 |passed t|o a spri|
|00002510| 74 65 20 63 72 65 61 74 | 69 6f 6e 20 28 74 68 65 |te creat|ion (the|
|00002520| 74 61 73 6b 2c 20 74 68 | 65 68 69 74 54 61 73 6b |task, th|ehitTask|
|00002530| 2c 20 61 6e 64 20 73 65 | 74 75 70 74 61 73 6b 29 |, and se|tuptask)|
|00002540| 20 63 61 6e 20 62 65 20 | 72 65 70 6c 61 63 65 64 | can be |replaced|
|00002550| 20 77 69 74 68 20 6e 69 | 6c 2e 20 20 49 6e 20 74 | with ni|l. In t|
|00002560| 68 69 73 20 77 61 79 2c | 20 6d 61 6e 79 20 64 69 |his way,| many di|
|00002570| 66 66 65 72 65 6e 74 20 | 73 65 74 74 69 6e 67 73 |fferent |settings|
|00002580| 20 61 72 65 20 70 6f 73 | 73 69 62 6c 65 2e 20 20 | are pos|sible. |
|00002590| 46 6f 72 20 69 6e 73 74 | 61 6e 63 65 2c 20 6d 61 |For inst|ance, ma|
|000025a0| 6b 65 20 74 68 65 20 20 | 68 69 74 54 61 73 6b 20 |ke the |hitTask |
|000025b0| 6e 69 6c 2c 20 69 66 20 | 79 6f 75 20 64 6f 6e 27 |nil, if |you don'|
|000025c0| 74 20 77 61 6e 74 20 74 | 68 65 20 73 70 72 69 74 |t want t|he sprit|
|000025d0| 65 20 74 6f 20 68 61 76 | 65 20 61 6e 79 20 72 65 |e to hav|e any re|
|000025e0| 61 63 74 69 6f 6e 20 77 | 69 74 68 20 61 6e 79 20 |action w|ith any |
|000025f0| 6f 74 68 65 72 20 73 70 | 72 69 74 65 20 77 68 65 |other sp|rite whe|
|00002600| 6e 20 69 74 20 63 6f 6c | 6c 69 64 65 73 20 77 69 |n it col|lides wi|
|00002610| 74 68 20 74 68 65 6d 2e | 20 52 45 4d 45 4d 42 45 |th them.| REMEMBE|
|00002620| 52 3a 20 64 6f 6e 27 74 | 20 61 6c 6c 6f 77 20 79 |R: don't| allow y|
|00002630| 6f 75 72 20 70 72 6f 67 | 72 61 6d 20 74 6f 20 63 |our prog|ram to c|
|00002640| 72 65 61 74 65 20 6d 6f | 72 65 20 74 68 61 6e 20 |reate mo|re than |
|00002650| 31 30 30 20 73 70 72 69 | 74 65 73 21 21 21 0d 0d |100 spri|tes!!!..|
|00002660| 70 72 6f 63 65 64 75 72 | 65 20 52 75 6e 47 52 41 |procedur|e RunGRA|
|00002670| 46 20 28 68 6f 77 66 69 | 78 3a 20 69 6e 74 65 67 |F (howfi|x: integ|
|00002680| 65 72 29 3b 0d 0d 54 68 | 69 73 20 70 72 6f 63 65 |er);..Th|is proce|
|00002690| 64 75 72 65 20 69 73 20 | 74 68 65 20 68 65 61 72 |dure is |the hear|
|000026a0| 74 20 6f 66 20 74 68 65 | 20 65 6e 74 69 72 65 20 |t of the| entire |
|000026b0| 47 52 41 46 20 75 6e 69 | 74 2e 20 20 54 68 69 73 |GRAF uni|t. This|
|000026c0| 20 70 72 6f 63 65 64 75 | 72 65 20 73 68 6f 75 6c | procedu|re shoul|
|000026d0| 64 20 62 65 20 63 61 6c | 6c 65 64 20 69 6e 20 61 |d be cal|led in a|
|000026e0| 6e 20 65 6e 64 6c 65 73 | 73 20 6c 6f 6f 70 20 75 |n endles|s loop u|
|000026f0| 6e 74 69 6c 20 74 68 65 | 20 65 6e 64 20 6f 66 20 |ntil the| end of |
|00002700| 74 68 65 20 70 72 6f 67 | 72 61 6d 2e 20 20 49 74 |the prog|ram. It|
|00002710| 20 72 75 6e 73 20 74 68 | 65 20 61 6e 69 6d 61 74 | runs th|e animat|
|00002720| 69 6f 6e 2c 20 61 6e 64 | 20 63 61 6c 6c 73 20 74 |ion, and| calls t|
|00002730| 68 65 20 74 61 73 6b 20 | 61 6e 64 20 63 6f 6c 6c |he task |and coll|
|00002740| 69 73 69 6f 6e 74 61 73 | 6b 20 70 72 6f 63 65 64 |isiontas|k proced|
|00002750| 75 72 65 73 20 66 6f 72 | 20 65 61 63 68 20 73 70 |ures for| each sp|
|00002760| 72 69 74 65 20 77 68 65 | 6e 20 6e 65 65 64 65 64 |rite whe|n needed|
|00002770| 2e 20 20 53 65 65 20 74 | 68 65 20 64 65 6d 6f 73 |. See t|he demos|
|00002780| 20 66 6f 72 20 65 78 61 | 6d 70 6c 65 73 20 6f 66 | for exa|mples of|
|00002790| 20 77 68 61 74 20 49 20 | 6d 65 61 6e 2e 20 20 68 | what I |mean. h|
|000027a0| 6f 77 66 69 78 20 73 65 | 74 73 20 68 6f 77 20 74 |owfix se|ts how t|
|000027b0| 68 65 20 73 70 72 69 74 | 65 73 20 73 68 6f 75 6c |he sprit|es shoul|
|000027c0| 64 20 62 65 20 72 65 66 | 72 65 73 68 65 64 20 6f |d be ref|reshed o|
|000027d0| 6e 20 74 68 65 20 73 63 | 72 65 65 6e 2e 20 20 54 |n the sc|reen. T|
|000027e0| 68 69 73 20 73 68 6f 75 | 6c 64 20 62 65 20 73 65 |his shou|ld be se|
|000027f0| 74 20 74 6f 20 31 2c 20 | 32 2c 20 6f 72 20 33 2e |t to 1, |2, or 3.|
|00002800| 20 20 32 20 69 73 20 74 | 68 65 20 62 61 73 69 63 | 2 is t|he basic|
|00002810| 20 61 6c 6c 2d 70 75 72 | 70 6f 73 65 20 73 65 74 | all-pur|pose set|
|00002820| 74 69 6e 67 3b 20 69 74 | 20 72 65 66 72 65 73 68 |ting; it| refresh|
|00002830| 65 73 20 6a 75 73 74 20 | 74 68 65 20 61 72 65 61 |es just |the area|
|00002840| 20 61 72 6f 75 6e 64 20 | 74 68 65 20 73 70 72 69 | around |the spri|
|00002850| 74 65 73 2e 20 20 49 74 | 20 69 73 20 74 68 65 20 |tes. It| is the |
|00002860| 66 61 73 74 65 73 74 2c | 20 62 75 74 20 74 68 65 |fastest,| but the|
|00002870| 20 61 6e 69 6d 61 74 69 | 6f 6e 20 63 61 6e 20 67 | animati|on can g|
|00002880| 65 74 20 61 20 6c 69 74 | 74 6c 65 20 62 6c 69 6e |et a lit|tle blin|
|00002890| 6b 79 20 77 68 65 6e 20 | 74 77 6f 20 73 70 72 69 |ky when |two spri|
|000028a0| 74 65 73 20 61 72 65 20 | 6d 6f 76 69 6e 67 20 6f |tes are |moving o|
|000028b0| 76 65 72 20 65 61 63 68 | 20 6f 74 68 65 72 2e 20 |ver each| other. |
|000028c0| 20 54 68 65 72 65 66 6f | 72 65 2c 20 69 66 20 79 | Therefo|re, if y|
|000028d0| 6f 75 20 61 72 65 20 6d | 61 6b 69 6e 67 20 61 20 |ou are m|aking a |
|000028e0| 67 61 6d 65 20 6c 69 6b | 65 20 47 52 41 46 2e 41 |game lik|e GRAF.A|
|000028f0| 72 63 61 64 65 20 77 68 | 65 72 65 20 73 70 72 69 |rcade wh|ere spri|
|00002900| 74 65 73 20 77 69 6c 6c | 20 62 65 20 6d 6f 76 69 |tes will| be movi|
|00002910| 6e 67 20 70 61 73 74 20 | 6f 6e 65 20 61 6e 6f 74 |ng past |one anot|
|00002920| 68 65 72 2c 20 64 6f 6e | 27 74 20 75 73 65 20 52 |her, don|'t use R|
|00002930| 75 6e 47 52 41 46 28 32 | 29 2e 20 20 54 72 79 20 |unGRAF(2|). Try |
|00002940| 69 74 20 69 6e 20 47 52 | 41 46 2e 41 72 63 61 64 |it in GR|AF.Arcad|
|00002950| 65 2c 20 61 6e 64 20 73 | 65 65 20 74 68 65 20 72 |e, and s|ee the r|
|00002960| 65 73 75 6c 74 73 2e 20 | 20 55 73 65 20 31 20 69 |esults. | Use 1 i|
|00002970| 66 20 79 6f 75 20 68 61 | 76 65 20 6d 61 6e 79 20 |f you ha|ve many |
|00002980| 73 70 72 69 74 65 73 28 | 6c 69 6b 65 20 32 35 29 |sprites(|like 25)|
|00002990| 20 6f 72 20 61 72 65 20 | 6d 61 6b 69 6e 67 20 61 | or are |making a|
|000029a0| 20 67 61 6d 65 20 77 68 | 65 72 65 20 73 70 72 69 | game wh|ere spri|
|000029b0| 74 65 73 20 77 69 6c 6c | 20 6e 6f 74 20 62 65 20 |tes will| not be |
|000029c0| 64 65 73 74 72 6f 79 65 | 64 20 77 68 65 6e 20 74 |destroye|d when t|
|000029d0| 68 65 79 20 63 6f 6c 6c | 69 64 65 20 7b 67 61 6d |hey coll|ide {gam|
|000029e0| 65 73 20 6c 69 6b 65 20 | 47 52 41 46 2e 41 72 63 |es like |GRAF.Arc|
|000029f0| 61 64 65 2c 20 77 68 69 | 63 68 20 75 73 65 73 20 |ade, whi|ch uses |
|00002a00| 52 75 6e 47 52 41 46 28 | 31 29 20 7d 2e 20 20 49 |RunGRAF(|1) }. I|
|00002a10| 74 20 69 73 20 73 6f 6d | 65 77 68 61 74 20 73 6c |t is som|ewhat sl|
|00002a20| 6f 77 65 72 20 62 65 63 | 61 75 73 65 20 69 74 20 |ower bec|ause it |
|00002a30| 72 65 66 72 65 73 68 65 | 73 20 74 68 65 20 65 6e |refreshe|s the en|
|00002a40| 74 69 72 65 20 73 63 72 | 65 65 6e 20 65 61 63 68 |tire scr|een each|
|00002a50| 20 66 72 61 6d 65 20 66 | 6f 72 20 70 61 72 74 20 | frame f|or part |
|00002a60| 6f 66 20 74 68 65 20 61 | 6e 69 6d 61 74 69 6f 6e |of the a|nimation|
|00002a70| 20 63 79 63 6c 65 2e 20 | 20 49 66 20 79 6f 75 20 | cycle. | If you |
|00002a80| 68 61 76 65 20 61 20 76 | 65 72 79 20 6c 61 72 67 |have a v|ery larg|
|00002a90| 65 20 73 63 72 65 65 6e | 20 73 69 7a 65 2c 20 6f |e screen| size, o|
|00002aa0| 72 20 61 20 50 49 43 54 | 20 62 61 63 6b 67 72 6f |r a PICT| backgro|
|00002ab0| 75 6e 64 20 74 68 61 74 | 20 74 61 6b 65 73 20 75 |und that| takes u|
|00002ac0| 70 20 61 20 6c 6f 74 20 | 6f 66 20 73 70 61 63 65 |p a lot |of space|
|00002ad0| 2c 20 72 65 66 72 65 73 | 68 69 6e 67 20 77 69 6c |, refres|hing wil|
|00002ae0| 6c 20 62 65 20 73 6c 6f | 77 65 72 2c 20 61 6e 64 |l be slo|wer, and|
|00002af0| 20 79 6f 75 72 20 61 6e | 69 6d 61 74 69 6f 6e 20 | your an|imation |
|00002b00| 77 69 6c 6c 20 62 65 20 | 73 6c 6f 77 65 72 2e 20 |will be |slower. |
|00002b10| 20 4f 6e 6c 79 20 75 73 | 65 20 52 75 6e 47 52 41 | Only us|e RunGRA|
|00002b20| 46 28 33 29 20 69 66 20 | 79 6f 75 20 75 73 65 20 |F(3) if |you use |
|00002b30| 61 20 6d 6f 75 6e 74 61 | 69 6e 20 6f 66 20 73 70 |a mounta|in of sp|
|00002b40| 72 69 74 65 73 2c 20 73 | 69 6e 63 65 20 69 74 20 |rites, s|ince it |
|00002b50| 72 65 66 72 65 73 68 65 | 73 20 74 68 65 20 65 6e |refreshe|s the en|
|00002b60| 74 69 72 65 20 73 63 72 | 65 65 6e 20 66 6f 72 20 |tire scr|een for |
|00002b70| 74 68 65 20 77 68 6f 6c | 65 20 61 6e 69 6d 61 74 |the whol|e animat|
|00002b80| 69 6f 6e 20 63 79 63 6c | 65 2e 20 20 45 78 70 65 |ion cycl|e. Expe|
|00002b90| 72 69 6d 65 6e 74 20 77 | 69 74 68 20 74 68 65 73 |riment w|ith thes|
|00002ba0| 65 20 73 65 74 74 69 6e | 67 73 20 69 6e 20 67 61 |e settin|gs in ga|
|00002bb0| 6d 65 73 20 79 6f 75 20 | 6d 61 6b 65 2c 20 74 6f |mes you |make, to|
|00002bc0| 20 73 65 65 20 77 68 69 | 63 68 20 6f 6e 65 20 77 | see whi|ch one w|
|00002bd0| 6f 72 6b 73 20 62 65 73 | 74 20 66 6f 72 20 79 6f |orks bes|t for yo|
|00002be0| 75 2e 0d 0d 20 70 72 6f | 63 65 64 75 72 65 20 53 |u... pro|cedure S|
|00002bf0| 6b 69 70 47 52 41 46 3b | 0d 0d 54 68 69 73 20 64 |kipGRAF;|..This d|
|00002c00| 6f 65 73 20 65 76 65 72 | 79 74 68 69 6e 67 20 74 |oes ever|ything t|
|00002c10| 68 61 74 20 52 75 6e 47 | 52 41 46 20 64 6f 65 73 |hat RunG|RAF does|
|00002c20| 2c 20 65 78 63 65 70 74 | 20 74 68 65 20 61 63 74 |, except| the act|
|00002c30| 75 61 6c 20 64 72 61 77 | 69 6e 67 2e 20 20 54 68 |ual draw|ing. Th|
|00002c40| 69 73 20 6d 61 6b 65 73 | 20 69 74 20 6d 75 63 68 |is makes| it much|
|00002c50| 20 66 61 73 74 65 72 2e | 20 20 44 6f 6e 27 74 20 | faster.| Don't |
|00002c60| 75 73 65 20 53 6b 69 70 | 47 52 41 46 20 74 6f 20 |use Skip|GRAF to |
|00002c70| 73 6b 69 70 20 6d 6f 72 | 65 20 74 68 61 6e 20 6f |skip mor|e than o|
|00002c80| 6e 65 20 63 6f 6e 73 65 | 63 75 74 69 76 65 20 61 |ne conse|cutive a|
|00002c90| 6e 69 6d 61 74 69 6f 6e | 20 66 72 61 6d 65 2c 20 |nimation| frame, |
|00002ca0| 62 65 63 61 75 73 65 20 | 74 68 65 20 61 6e 69 6d |because |the anim|
|00002cb0| 61 74 69 6f 6e 20 77 69 | 6c 6c 20 67 65 74 20 76 |ation wi|ll get v|
|00002cc0| 65 72 79 20 6a 65 72 6b | 79 2e 20 20 55 73 65 20 |ery jerk|y. Use |
|00002cd0| 74 68 69 73 20 65 76 65 | 72 79 20 6f 74 68 65 72 |this eve|ry other|
|00002ce0| 20 66 72 61 6d 65 20 61 | 6c 74 65 72 6e 61 74 69 | frame a|lternati|
|00002cf0| 6e 67 20 77 69 74 68 20 | 52 75 6e 47 52 41 46 20 |ng with |RunGRAF |
|00002d00| 69 66 20 79 6f 75 20 68 | 61 76 65 20 61 20 6c 6f |if you h|ave a lo|
|00002d10| 74 20 6f 66 20 73 70 72 | 69 74 65 73 2c 20 61 6e |t of spr|ites, an|
|00002d20| 64 20 79 6f 75 20 4d 55 | 53 54 20 68 61 76 65 20 |d you MU|ST have |
|00002d30| 68 69 67 68 65 72 20 73 | 70 65 65 64 2e 20 20 4d |higher s|peed. M|
|00002d40| 6f 73 74 20 67 61 6d 65 | 73 20 77 69 6c 6c 20 62 |ost game|s will b|
|00002d50| 65 20 62 65 74 74 65 72 | 20 61 20 6c 69 74 74 6c |e better| a littl|
|00002d60| 65 20 73 6c 6f 77 65 72 | 20 75 73 69 6e 67 20 6a |e slower| using j|
|00002d70| 75 73 74 20 52 75 6e 47 | 52 41 46 2e 0d 0d 20 70 |ust RunG|RAF... p|
|00002d80| 72 6f 63 65 64 75 72 65 | 20 6b 69 6c 6c 73 70 72 |rocedure| killspr|
|00002d90| 69 74 65 20 28 76 61 72 | 20 77 68 61 74 6f 6e 65 |ite (var| whatone|
|00002da0| 3a 20 73 70 72 69 74 65 | 29 3b 0d 0d 54 68 69 73 |: sprite|);..This|
|00002db0| 20 70 72 6f 63 65 64 75 | 72 65 20 73 68 6f 75 6c | procedu|re shoul|
|00002dc0| 64 20 62 65 20 63 61 6c | 6c 65 64 20 66 72 6f 6d |d be cal|led from|
|00002dd0| 20 61 20 63 6f 6c 6c 69 | 73 69 6f 6e 74 61 73 6b | a colli|siontask|
|00002de0| 20 6f 72 20 74 68 65 74 | 61 73 6b 20 70 72 6f 63 | or thet|ask proc|
|00002df0| 65 64 75 72 65 2c 20 74 | 6f 20 6d 61 6b 65 20 61 |edure, t|o make a|
|00002e00| 20 73 70 72 69 74 65 20 | 64 69 73 61 70 70 65 61 | sprite |disappea|
|00002e10| 72 20 77 68 65 6e 20 69 | 74 20 63 6f 6c 6c 69 64 |r when i|t collid|
|00002e20| 65 73 20 77 69 74 68 20 | 61 6e 6f 74 68 65 72 20 |es with |another |
|00002e30| 73 70 72 69 74 65 2e 20 | 20 49 74 20 64 6f 65 73 |sprite. | It does|
|00002e40| 20 74 68 69 73 20 62 79 | 20 73 65 74 74 69 6e 67 | this by| setting|
|00002e50| 20 74 68 65 20 66 6c 61 | 67 20 66 6f 72 20 52 75 | the fla|g for Ru|
|00002e60| 6e 47 52 41 46 20 74 6f | 20 64 65 6c 65 74 65 20 |nGRAF to| delete |
|00002e70| 74 68 65 20 73 70 72 69 | 74 65 2e 20 20 53 65 65 |the spri|te. See|
|00002e80| 20 74 68 65 20 47 52 41 | 46 2e 43 6f 6c 6c 69 73 | the GRA|F.Collis|
|00002e90| 69 6f 6e 73 20 64 65 6d | 6f 2e 20 20 41 6e 20 65 |ions dem|o. An e|
|00002ea0| 78 61 6d 70 6c 65 20 6f | 66 20 69 74 73 20 75 73 |xample o|f its us|
|00002eb0| 65 20 6d 69 67 68 74 20 | 67 6f 20 6c 69 6b 65 20 |e might |go like |
|00002ec0| 74 68 69 73 3a 20 6b 69 | 6c 6c 73 70 72 69 74 65 |this: ki|llsprite|
|00002ed0| 28 6d 65 29 2e 0d 0d 70 | 72 6f 63 65 64 75 72 65 |(me)...p|rocedure|
|00002ee0| 20 6b 69 6c 6c 61 6c 6c | 73 70 72 69 74 65 73 3b | killall|sprites;|
|00002ef0| 0d 0d 54 68 69 73 20 70 | 72 6f 63 65 64 75 72 65 |..This p|rocedure|
|00002f00| 20 6b 69 6c 6c 73 20 61 | 6c 6c 20 74 68 65 20 73 | kills a|ll the s|
|00002f10| 70 72 69 74 65 73 2c 20 | 61 6e 64 20 75 6e 6c 69 |prites, |and unli|
|00002f20| 6b 65 20 6b 69 6c 6c 73 | 70 72 69 74 65 2c 20 64 |ke kills|prite, d|
|00002f30| 6f 65 73 20 6e 6f 74 20 | 6e 65 65 64 20 74 6f 20 |oes not |need to |
|00002f40| 62 65 20 63 61 6c 6c 65 | 64 20 66 72 6f 6d 20 61 |be calle|d from a|
|00002f50| 20 63 6f 6c 6c 69 73 69 | 6f 6e 74 61 73 6b 20 6f | collisi|ontask o|
|00002f60| 72 20 74 68 65 74 61 73 | 6b 20 70 72 6f 63 65 64 |r thetas|k proced|
|00002f70| 75 72 65 2e 0d 0d 20 66 | 75 6e 63 74 69 6f 6e 20 |ure... f|unction |
|00002f80| 63 6f 6c 6c 69 73 69 6f | 6e 74 65 73 74 20 28 76 |collisio|ntest (v|
|00002f90| 61 72 20 74 68 65 6f 6e | 65 3a 20 73 70 72 69 74 |ar theon|e: sprit|
|00002fa0| 65 3b 20 68 6d 6f 76 2c | 20 76 6d 6f 76 3a 20 69 |e; hmov,| vmov: i|
|00002fb0| 6e 74 65 67 65 72 29 3a | 20 62 6f 6f 6c 65 61 6e |nteger):| boolean|
|00002fc0| 3b 0d 0d 54 68 69 73 20 | 66 75 6e 63 74 69 6f 6e |;..This |function|
|00002fd0| 20 72 65 74 75 72 6e 73 | 20 74 72 75 65 20 69 66 | returns| true if|
|00002fe0| 20 74 68 65 20 73 70 72 | 69 74 65 20 70 61 73 73 | the spr|ite pass|
|00002ff0| 65 64 20 62 79 20 74 68 | 65 6f 6e 65 20 68 61 73 |ed by th|eone has|
|00003000| 20 63 6f 6c 6c 69 64 65 | 64 20 77 69 74 68 20 61 | collide|d with a|
|00003010| 6e 6f 74 68 65 72 20 73 | 70 72 69 74 65 3b 20 69 |nother s|prite; i|
|00003020| 74 20 72 65 74 75 72 6e | 73 20 66 61 6c 73 65 20 |t return|s false |
|00003030| 6f 74 68 65 72 77 69 73 | 65 2e 20 20 59 6f 75 20 |otherwis|e. You |
|00003040| 70 61 73 73 20 61 20 73 | 70 72 69 74 65 20 69 6e |pass a s|prite in|
|00003050| 20 74 68 65 6f 6e 65 2c | 20 61 6e 64 20 61 20 68 | theone,| and a h|
|00003060| 6f 72 69 7a 6f 6e 74 61 | 6c 20 73 68 69 66 74 2c |orizonta|l shift,|
|00003070| 20 61 6e 64 20 76 65 72 | 74 69 63 61 6c 20 73 68 | and ver|tical sh|
|00003080| 69 66 74 20 7b 68 6d 6f | 76 20 61 6e 64 20 76 6d |ift {hmo|v and vm|
|00003090| 6f 76 7d 2e 20 20 57 69 | 74 68 20 74 68 69 73 20 |ov}. Wi|th this |
|000030a0| 66 75 6e 63 74 69 6f 6e | 20 79 6f 75 20 63 61 6e |function| you can|
|000030b0| 20 74 65 73 74 20 69 66 | 20 61 20 73 70 72 69 74 | test if| a sprit|
|000030c0| 65 20 69 73 20 69 6e 20 | 66 72 6f 6e 74 2c 20 62 |e is in |front, b|
|000030d0| 65 68 69 6e 64 2c 20 61 | 62 6f 76 65 2c 20 6f 72 |ehind, a|bove, or|
|000030e0| 20 62 65 6c 6f 77 20 6f | 66 20 61 20 70 61 72 74 | below o|f a part|
|000030f0| 69 63 75 6c 61 72 20 73 | 70 72 69 74 65 3b 20 6a |icular s|prite; j|
|00003100| 75 73 74 20 70 61 73 73 | 20 74 68 65 20 70 72 6f |ust pass| the pro|
|00003110| 70 65 72 20 70 6f 73 69 | 74 69 76 65 20 6f 72 20 |per posi|tive or |
|00003120| 6e 65 67 61 74 69 76 65 | 20 61 6d 6f 75 6e 74 20 |negative| amount |
|00003130| 6f 66 20 70 69 78 65 6c | 73 20 74 6f 20 68 6d 6f |of pixel|s to hmo|
|00003140| 76 20 61 6e 64 20 76 6d | 6f 76 2e 20 20 54 68 69 |v and vm|ov. Thi|
|00003150| 73 20 66 75 6e 63 74 69 | 6f 6e 20 64 6f 65 73 6e |s functi|on doesn|
|00003160| 27 74 20 61 63 74 75 61 | 6c 6c 79 20 6d 6f 76 65 |'t actua|lly move|
|00003170| 20 74 68 65 20 73 70 72 | 69 74 65 3b 20 69 74 20 | the spr|ite; it |
|00003180| 6a 75 73 74 20 74 65 73 | 74 73 20 77 68 65 74 68 |just tes|ts wheth|
|00003190| 65 72 20 61 20 63 6f 6c | 6c 69 73 69 6f 6e 20 77 |er a col|lision w|
|000031a0| 6f 75 6c 64 20 6f 63 63 | 75 72 20 69 66 20 79 6f |ould occ|ur if yo|
|000031b0| 75 20 61 63 74 75 61 6c | 6c 79 20 6d 6f 76 65 64 |u actual|ly moved|
|000031c0| 20 74 68 65 20 73 70 72 | 69 74 65 20 74 68 61 74 | the spr|ite that|
|000031d0| 20 6d 61 6e 79 20 70 69 | 78 65 6c 73 20 68 6f 72 | many pi|xels hor|
|000031e0| 69 7a 6f 6e 74 61 6c 6c | 79 20 6f 72 20 76 65 72 |izontall|y or ver|
|000031f0| 74 69 63 61 6c 6c 79 2e | 20 20 41 6c 73 6f 2c 20 |tically.| Also, |
|00003200| 69 66 20 63 6f 6c 6c 69 | 73 69 6f 6e 74 65 73 74 |if colli|siontest|
|00003210| 20 63 6f 6d 65 73 20 62 | 61 63 6b 20 74 72 75 65 | comes b|ack true|
|00003220| 2c 20 74 68 65 6e 20 74 | 68 65 20 63 6f 6c 6c 69 |, then t|he colli|
|00003230| 73 69 6f 6e 77 69 74 68 | 20 66 69 65 6c 64 20 6f |sionwith| field o|
|00003240| 66 20 74 68 65 20 73 70 | 72 69 74 65 20 77 69 6c |f the sp|rite wil|
|00003250| 6c 20 68 6f 6c 64 20 61 | 6e 20 69 6e 74 65 67 65 |l hold a|n intege|
|00003260| 72 20 70 6f 69 6e 74 69 | 6e 67 20 74 6f 20 74 68 |r pointi|ng to th|
|00003270| 65 20 61 72 72 61 79 20 | 6e 75 6d 62 65 72 20 6f |e array |number o|
|00003280| 66 20 74 68 65 20 73 70 | 72 69 74 65 20 69 74 20 |f the sp|rite it |
|00003290| 63 6f 6c 6c 69 64 65 64 | 20 77 69 74 68 2e 20 20 |collided| with. |
|000032a0| 54 68 65 20 73 70 72 69 | 74 65 20 69 74 20 63 6f |The spri|te it co|
|000032b0| 6c 6c 69 64 65 64 20 77 | 69 74 68 20 63 61 6e 20 |llided w|ith can |
|000032c0| 74 68 65 6e 20 62 65 20 | 61 63 63 65 73 73 65 64 |then be |accessed|
|000032d0| 20 77 69 74 68 20 74 68 | 65 73 70 72 69 74 65 5b | with th|esprite[|
|000032e0| 79 6f 75 72 73 70 72 69 | 74 65 2e 63 6f 6c 6c 69 |yourspri|te.colli|
|000032f0| 73 69 6f 6e 77 69 74 68 | 5d 20 7b 77 68 65 72 65 |sionwith|] {where|
|00003300| 20 79 6f 75 72 73 70 72 | 69 74 65 20 73 68 6f 75 | yourspr|ite shou|
|00003310| 6c 64 20 62 65 20 74 68 | 65 20 6e 61 6d 65 20 6f |ld be th|e name o|
|00003320| 66 20 79 6f 75 72 20 73 | 70 72 69 74 65 7d 20 6a |f your s|prite} j|
|00003330| 75 73 74 20 6c 69 6b 65 | 20 79 6f 75 20 64 6f 20 |ust like| you do |
|00003340| 77 69 74 68 20 4d 45 20 | 69 6e 20 74 68 65 20 74 |with ME |in the t|
|00003350| 61 73 6b 20 70 72 6f 63 | 65 64 75 72 65 2e 0d 0d |ask proc|edure...|
|00003360| 70 72 6f 63 65 64 75 72 | 65 20 70 75 74 66 61 63 |procedur|e putfac|
|00003370| 65 6f 6e 62 61 63 6b 67 | 72 6f 75 6e 64 20 28 77 |eonbackg|round (w|
|00003380| 68 61 74 66 61 63 65 3a | 20 66 61 63 65 3b 20 74 |hatface:| face; t|
|00003390| 68 65 70 6f 69 6e 74 3a | 20 70 6f 69 6e 74 29 3b |hepoint:| point);|
|000033a0| 0d 0d 44 72 61 77 73 20 | 74 68 65 20 66 61 63 65 |..Draws |the face|
|000033b0| 20 70 61 73 73 65 64 20 | 74 6f 20 74 68 65 20 70 | passed |to the p|
|000033c0| 72 6f 63 65 64 75 72 65 | 20 6f 6e 20 74 68 65 20 |rocedure| on the |
|000033d0| 62 61 63 6b 67 72 6f 75 | 6e 64 20 70 69 63 74 75 |backgrou|nd pictu|
|000033e0| 72 65 20 61 74 20 74 68 | 65 20 70 6f 69 6e 74 20 |re at th|e point |
|000033f0| 73 70 65 63 69 66 69 65 | 64 20 62 79 20 74 68 65 |specifie|d by the|
|00003400| 70 6f 69 6e 74 2e 20 0d | 0d 20 66 75 6e 63 74 69 |point. .|. functi|
|00003410| 6f 6e 20 64 6f 61 6c 65 | 72 74 20 28 74 68 65 73 |on doale|rt (thes|
|00003420| 74 72 69 6e 67 3a 20 73 | 74 72 32 35 35 3b 20 74 |tring: s|tr255; t|
|00003430| 68 65 73 69 7a 65 3a 20 | 69 6e 74 65 67 65 72 3b |hesize: |integer;|
|00003440| 20 68 6f 77 72 65 66 72 | 65 73 68 3a 20 69 6e 74 | howrefr|esh: int|
|00003450| 65 67 65 72 29 3a 20 62 | 6f 6f 6c 65 61 6e 3b 0d |eger): b|oolean;.|
|00003460| 0d 09 41 20 70 72 69 6d | 61 74 69 76 65 20 61 6c |..A prim|ative al|
|00003470| 65 72 74 20 66 75 6e 63 | 74 69 6f 6e 20 49 20 63 |ert func|tion I c|
|00003480| 72 65 61 74 65 64 2c 20 | 74 68 61 74 20 61 6c 77 |reated, |that alw|
|00003490| 61 79 73 20 63 6f 6d 65 | 73 20 62 61 63 6b 20 74 |ays come|s back t|
|000034a0| 72 75 65 2e 20 20 54 68 | 65 73 74 72 69 6e 67 20 |rue. Th|estring |
|000034b0| 69 73 20 74 68 65 20 73 | 74 72 69 6e 67 20 74 6f |is the s|tring to|
|000034c0| 20 62 65 20 69 6e 20 74 | 68 65 20 61 6c 65 72 74 | be in t|he alert|
|000034d0| 20 62 6f 78 2e 20 20 44 | 6f 6e 27 74 20 6d 61 6b | box. D|on't mak|
|000034e0| 65 20 69 74 20 74 6f 6f | 20 6c 6f 6e 67 2c 20 6f |e it too| long, o|
|000034f0| 72 20 69 74 20 77 69 6c | 6c 20 68 61 6e 67 20 6f |r it wil|l hang o|
|00003500| 75 74 20 70 61 73 74 20 | 74 68 65 20 65 64 67 65 |ut past |the edge|
|00003510| 20 6f 66 20 74 68 65 20 | 61 6c 65 72 74 20 62 6f | of the |alert bo|
|00003520| 78 2e 20 20 54 68 65 73 | 69 7a 65 20 69 73 20 74 |x. Thes|ize is t|
|00003530| 68 65 20 74 65 78 74 20 | 73 69 7a 65 20 69 6e 20 |he text |size in |
|00003540| 70 6f 69 6e 74 73 20 7b | 75 73 75 61 6c 6c 79 20 |points {|usually |
|00003550| 31 32 20 6f 72 20 73 6f | 20 69 73 20 67 6f 6f 64 |12 or so| is good|
|00003560| 7d 20 66 6f 72 20 74 68 | 65 20 73 74 72 69 6e 67 |} for th|e string|
|00003570| 20 69 6e 20 74 68 65 20 | 61 6c 65 72 74 20 62 6f | in the |alert bo|
|00003580| 78 2e 20 20 54 68 65 20 | 73 6d 61 6c 6c 65 72 20 |x. The |smaller |
|00003590| 74 68 65 20 74 65 78 74 | 20 73 69 7a 65 2c 20 74 |the text| size, t|
|000035a0| 68 65 20 6d 6f 72 65 20 | 77 6f 72 64 73 20 79 6f |he more |words yo|
|000035b0| 75 20 63 61 6e 20 66 69 | 74 20 69 6e 20 74 68 65 |u can fi|t in the|
|000035c0| 20 62 6f 78 2e 20 20 54 | 68 65 72 65 20 61 72 65 | box. T|here are|
|000035d0| 20 74 68 72 65 65 20 63 | 6f 6e 73 74 61 6e 74 73 | three c|onstants|
|000035e0| 20 77 68 69 63 68 20 61 | 72 65 20 74 68 65 20 73 | which a|re the s|
|000035f0| 65 74 74 69 6e 67 73 20 | 79 6f 75 20 63 61 6e 20 |ettings |you can |
|00003600| 70 61 73 73 20 74 6f 20 | 68 6f 77 72 65 66 72 65 |pass to |howrefre|
|00003610| 73 68 2e 20 20 49 66 20 | 79 6f 75 20 70 61 73 73 |sh. If |you pass|
|00003620| 20 77 68 69 74 65 72 65 | 66 2c 20 77 68 65 6e 20 | whitere|f, when |
|00003630| 74 68 65 20 4f 4b 20 62 | 6f 78 20 69 73 20 63 6c |the OK b|ox is cl|
|00003640| 69 63 6b 65 64 20 6f 6e | 20 69 6e 20 74 68 65 20 |icked on| in the |
|00003650| 61 6c 65 72 74 20 62 6f | 78 2c 20 74 68 65 20 73 |alert bo|x, the s|
|00003660| 63 72 65 65 6e 20 77 69 | 6c 6c 20 62 65 20 72 65 |creen wi|ll be re|
|00003670| 66 72 65 73 68 65 64 20 | 77 69 74 68 20 77 68 69 |freshed |with whi|
|00003680| 74 65 2e 20 20 49 66 20 | 79 6f 75 20 70 61 73 73 |te. If |you pass|
|00003690| 20 62 6c 61 63 6b 72 65 | 66 2c 20 74 68 65 20 73 | blackre|f, the s|
|000036a0| 63 72 65 65 6e 20 77 69 | 6c 6c 20 62 65 20 72 65 |creen wi|ll be re|
|000036b0| 66 72 65 73 68 65 64 20 | 77 69 74 68 20 62 6c 61 |freshed |with bla|
|000036c0| 63 6b 2e 20 20 49 66 20 | 79 6f 75 20 70 61 73 73 |ck. If |you pass|
|000036d0| 20 62 61 63 6b 67 72 6f | 75 6e 64 72 65 66 2c 20 | backgro|undref, |
|000036e0| 44 6f 61 6c 65 72 74 20 | 77 69 6c 6c 20 6a 75 73 |Doalert |will jus|
|000036f0| 74 20 63 61 6c 6c 20 75 | 70 64 61 74 65 73 63 72 |t call u|pdatescr|
|00003700| 65 65 6e 20 7b 65 78 70 | 6c 61 69 6e 65 64 20 61 |een {exp|lained a|
|00003710| 62 6f 76 65 7d 2e 20 20 | 55 73 65 20 77 68 69 74 |bove}. |Use whit|
|00003720| 65 72 65 66 20 6f 72 20 | 62 6c 61 63 6b 72 65 66 |eref or |blackref|
|00003730| 20 69 66 20 79 6f 75 20 | 68 61 76 65 20 6e 6f 74 | if you |have not|
|00003740| 20 79 65 74 20 63 61 6c | 6c 65 64 20 47 52 41 46 | yet cal|led GRAF|
|00003750| 49 6e 69 74 2e 20 20 41 | 20 74 79 70 69 63 61 6c |Init. A| typical|
|00003760| 20 63 61 6c 6c 20 6f 66 | 20 64 6f 61 6c 65 72 74 | call of| doalert|
|00003770| 20 6d 69 67 68 74 20 67 | 6f 20 6c 69 6b 65 20 74 | might g|o like t|
|00003780| 68 69 73 3a 20 20 74 65 | 6d 70 3a 3d 64 6f 61 6c |his: te|mp:=doal|
|00003790| 65 72 74 28 27 54 68 69 | 73 20 69 73 20 61 20 74 |ert('Thi|s is a t|
|000037a0| 65 73 74 27 2c 31 36 2c | 62 61 63 6b 67 72 6f 75 |est',16,|backgrou|
|000037b0| 6e 64 72 65 66 29 3b 0d | 0d 20 66 75 6e 63 74 69 |ndref);.|. functi|
|000037c0| 6f 6e 20 47 52 41 46 4e | 75 6d 54 6f 53 74 72 69 |on GRAFN|umToStri|
|000037d0| 6e 67 20 28 6c 3a 20 69 | 6e 74 65 67 65 72 29 3a |ng (l: i|nteger):|
|000037e0| 20 53 74 72 32 35 35 3b | 0d 0d 50 61 73 73 20 61 | Str255;|..Pass a|
|000037f0| 6e 20 69 6e 74 65 67 65 | 72 2c 20 61 6e 64 20 69 |n intege|r, and i|
|00003800| 74 20 77 69 6c 6c 20 72 | 65 74 75 72 6e 20 74 68 |t will r|eturn th|
|00003810| 61 74 20 69 6e 74 65 67 | 65 72 20 61 73 20 61 20 |at integ|er as a |
|00003820| 73 74 72 69 6e 67 2c 20 | 74 6f 20 62 65 20 75 73 |string, |to be us|
|00003830| 65 64 20 62 79 20 64 72 | 61 77 73 74 72 69 6e 67 |ed by dr|awstring|
|00003840| 2c 20 65 74 63 2e 20 0d | 0d 20 66 75 6e 63 74 69 |, etc. .|. functi|
|00003850| 6f 6e 20 72 61 6e 64 6f | 6d 69 7a 65 20 28 74 68 |on rando|mize (th|
|00003860| 65 6e 75 6d 3a 20 69 6e | 74 65 67 65 72 29 3a 20 |enum: in|teger): |
|00003870| 69 6e 74 65 67 65 72 3b | 0d 0d 52 65 74 75 72 6e |integer;|..Return|
|00003880| 73 20 61 20 72 61 6e 64 | 6f 6d 20 6e 75 6d 62 65 |s a rand|om numbe|
|00003890| 72 20 66 72 6f 6d 20 31 | 20 74 6f 20 74 68 65 20 |r from 1| to the |
|000038a0| 6e 75 6d 62 65 72 20 79 | 6f 75 20 70 61 73 73 20 |number y|ou pass |
|000038b0| 74 6f 20 74 68 65 20 66 | 75 6e 63 74 69 6f 6e 2e |to the f|unction.|
|000038c0| 0d 0d 20 70 72 6f 63 65 | 64 75 72 65 20 67 65 74 |.. proce|dure get|
|000038d0| 73 6f 75 6e 64 20 28 74 | 68 65 6f 6e 65 3a 20 69 |sound (t|heone: i|
|000038e0| 6e 74 65 67 65 72 29 3b | 0d 0d 54 68 69 73 20 70 |nteger);|..This p|
|000038f0| 72 6f 63 65 64 75 72 65 | 20 61 6e 64 20 74 68 65 |rocedure| and the|
|00003900| 20 6e 65 78 74 20 70 72 | 6f 63 65 64 75 72 65 20 | next pr|ocedure |
|00003910| 7b 70 6c 61 79 73 6f 75 | 6e 64 7d 20 61 72 65 20 |{playsou|nd} are |
|00003920| 74 68 65 20 74 77 6f 20 | 65 61 73 79 20 73 6f 75 |the two |easy sou|
|00003930| 6e 64 20 72 6f 75 74 69 | 6e 65 73 2e 20 20 46 6f |nd routi|nes. Fo|
|00003940| 72 20 6d 61 6e 79 20 70 | 75 72 70 6f 73 65 73 2c |r many p|urposes,|
|00003950| 20 74 68 65 79 20 77 69 | 6c 6c 20 62 65 20 61 6c | they wi|ll be al|
|00003960| 6c 20 79 6f 75 20 77 69 | 6c 6c 20 6e 65 65 64 2e |l you wi|ll need.|
|00003970| 20 49 66 20 74 68 65 79 | 20 61 72 65 20 6e 6f 74 | If they| are not|
|00003980| 2c 20 7b 69 66 20 79 6f | 75 20 6e 65 65 64 20 6d |, {if yo|u need m|
|00003990| 61 6e 79 20 73 6f 75 6e | 64 73 20 6f 72 20 6d 61 |any soun|ds or ma|
|000039a0| 6e 79 20 73 6f 75 6e 64 | 20 63 68 61 6e 65 6c 73 |ny sound| chanels|
|000039b0| 20 66 6f 72 20 68 61 76 | 69 6e 67 20 6d 61 6e 79 | for hav|ing many|
|000039c0| 20 73 6f 75 6e 64 73 20 | 70 6c 61 79 69 6e 67 20 | sounds |playing |
|000039d0| 61 74 20 74 68 65 20 73 | 61 6d 65 20 74 69 6d 65 |at the s|ame time|
|000039e0| 7d 20 79 6f 75 20 63 61 | 6e 20 75 73 65 20 74 68 |} you ca|n use th|
|000039f0| 65 20 6f 74 68 65 72 20 | 72 6f 75 74 69 6e 65 73 |e other |routines|
|00003a00| 20 69 6e 63 6c 75 64 65 | 64 2e 20 20 54 68 69 73 | include|d. This|
|00003a10| 20 72 6f 75 74 69 6e 65 | 20 67 65 74 73 20 74 68 | routine| gets th|
|00003a20| 65 20 73 6f 75 6e 64 20 | 72 65 73 6f 75 72 63 65 |e sound |resource|
|00003a30| 20 77 69 74 68 20 74 68 | 65 20 49 44 20 6e 75 6d | with th|e ID num|
|00003a40| 62 65 72 20 79 6f 75 20 | 73 70 65 63 69 66 79 20 |ber you |specify |
|00003a50| 77 69 74 68 20 74 68 65 | 6f 6e 65 2e 0d 0d 20 70 |with the|one... p|
|00003a60| 72 6f 63 65 64 75 72 65 | 20 70 6c 61 79 73 6f 75 |rocedure| playsou|
|00003a70| 6e 64 20 28 69 66 61 73 | 79 6e 63 3a 20 62 6f 6f |nd (ifas|ync: boo|
|00003a80| 6c 65 61 6e 29 3b 0d 0d | 54 68 69 73 20 72 6f 75 |lean);..|This rou|
|00003a90| 74 69 6e 65 20 69 73 20 | 74 68 65 20 6f 74 68 65 |tine is |the othe|
|00003aa0| 72 20 65 61 73 79 20 73 | 6f 75 6e 64 20 72 6f 75 |r easy s|ound rou|
|00003ab0| 74 69 6e 65 2e 20 20 49 | 74 20 70 6c 61 79 73 20 |tine. I|t plays |
|00003ac0| 74 68 65 20 73 6f 75 6e | 64 20 6c 6f 61 64 65 64 |the soun|d loaded|
|00003ad0| 20 77 69 74 68 20 67 65 | 74 73 6f 75 6e 64 2e 20 | with ge|tsound. |
|00003ae0| 20 49 66 20 69 66 61 73 | 79 6e 63 20 69 73 20 66 | If ifas|ync is f|
|00003af0| 61 6c 73 65 2c 20 74 68 | 65 6e 20 74 68 65 20 72 |alse, th|en the r|
|00003b00| 65 73 74 20 6f 66 20 79 | 6f 75 72 20 70 72 6f 67 |est of y|our prog|
|00003b10| 72 61 6d 20 77 69 6c 6c | 20 73 74 6f 70 20 66 75 |ram will| stop fu|
|00003b20| 6e 63 74 69 6f 6e 69 6e | 67 20 75 6e 74 69 6c 20 |nctionin|g until |
|00003b30| 74 68 65 20 73 6f 75 6e | 64 20 69 73 20 66 69 6e |the soun|d is fin|
|00003b40| 69 73 68 65 64 2e 20 20 | 49 66 20 69 66 61 73 79 |ished. |If ifasy|
|00003b50| 6e 63 20 69 73 20 74 72 | 75 65 2c 20 74 68 65 6e |nc is tr|ue, then|
|00003b60| 20 74 68 65 20 73 6f 75 | 6e 64 20 77 69 6c 6c 20 | the sou|nd will |
|00003b70| 70 6c 61 79 20 77 68 69 | 6c 65 20 74 68 65 20 70 |play whi|le the p|
|00003b80| 72 6f 67 72 61 6d 20 63 | 6f 6e 74 69 6e 75 65 73 |rogram c|ontinues|
|00003b90| 2e 0d 0d 20 70 72 6f 63 | 65 64 75 72 65 20 6f 70 |... proc|edure op|
|00003ba0| 65 6e 63 68 61 6e 6e 65 | 6c 20 28 74 68 65 6e 75 |enchanne|l (thenu|
|00003bb0| 6d 3a 20 69 6e 74 65 67 | 65 72 29 3b 0d 0d 54 68 |m: integ|er);..Th|
|00003bc0| 69 73 20 70 72 6f 63 65 | 64 75 72 65 20 6f 70 65 |is proce|dure ope|
|00003bd0| 6e 73 20 61 20 63 68 61 | 6e 6e 65 6c 20 74 68 61 |ns a cha|nnel tha|
|00003be0| 74 20 79 6f 75 20 61 63 | 63 65 73 73 20 77 69 74 |t you ac|cess wit|
|00003bf0| 68 20 74 68 65 20 6e 75 | 6d 62 65 72 20 79 6f 75 |h the nu|mber you|
|00003c00| 20 70 61 73 73 20 74 68 | 72 6f 75 67 68 20 74 68 | pass th|rough th|
|00003c10| 65 6e 75 6d 2e 20 20 54 | 68 65 20 73 6f 75 6e 64 |enum. T|he sound|
|00003c20| 20 63 68 61 6e 6e 65 6c | 73 20 61 72 65 20 6e 75 | channel|s are nu|
|00003c30| 6d 62 65 72 65 64 20 66 | 72 6f 6d 20 31 20 74 6f |mbered f|rom 1 to|
|00003c40| 20 32 30 2c 20 73 6f 20 | 64 6f 6e 27 74 20 6d 61 | 20, so |don't ma|
|00003c50| 6b 65 20 74 68 65 6e 75 | 6d 20 62 65 20 6d 6f 72 |ke thenu|m be mor|
|00003c60| 65 20 74 68 61 6e 20 32 | 30 2e 20 20 45 61 63 68 |e than 2|0. Each|
|00003c70| 20 73 6f 75 6e 64 20 63 | 68 61 6e 6e 65 6c 20 63 | sound c|hannel c|
|00003c80| 61 6e 20 70 6c 61 79 20 | 61 20 64 69 66 66 65 72 |an play |a differ|
|00003c90| 65 6e 74 20 73 6f 75 6e | 64 20 61 74 20 74 68 65 |ent soun|d at the|
|00003ca0| 20 73 61 6d 65 20 74 69 | 6d 65 2e 20 20 42 65 63 | same ti|me. Bec|
|00003cb0| 61 75 73 65 20 74 68 65 | 20 63 68 61 6e 6e 65 6c |ause the| channel|
|00003cc0| 73 20 61 72 65 20 6e 75 | 6d 62 65 72 65 64 20 66 |s are nu|mbered f|
|00003cd0| 72 6f 6d 20 31 20 74 6f | 20 32 30 2c 20 79 6f 75 |rom 1 to| 20, you|
|00003ce0| 20 63 61 6e 20 6f 70 65 | 6e 20 75 70 20 74 6f 20 | can ope|n up to |
|00003cf0| 32 30 20 73 6f 75 6e 64 | 20 63 68 61 6e 6e 65 6c |20 sound| channel|
|00003d00| 73 2e 20 20 48 6f 77 65 | 76 65 72 2c 20 69 66 20 |s. Howe|ver, if |
|00003d10| 79 6f 75 20 75 73 65 20 | 61 20 6c 6f 74 20 6f 66 |you use |a lot of|
|00003d20| 20 73 6f 75 6e 64 20 63 | 68 61 6e 6e 65 6c 73 2c | sound c|hannels,|
|00003d30| 20 69 74 20 77 69 6c 6c | 20 73 6c 6f 77 20 64 6f | it will| slow do|
|00003d40| 77 6e 20 79 6f 75 72 20 | 70 72 6f 67 72 61 6d 2e |wn your |program.|
|00003d50| 20 20 54 68 65 72 65 66 | 6f 72 65 2c 20 75 73 65 | Theref|ore, use|
|00003d60| 20 74 68 65 20 6d 69 6e | 69 6d 75 6d 20 6e 75 6d | the min|imum num|
|00003d70| 62 65 72 20 6f 66 20 63 | 68 61 6e 6e 65 6c 73 20 |ber of c|hannels |
|00003d80| 79 6f 75 20 63 61 6e 2e | 20 20 41 20 74 79 70 69 |you can.| A typi|
|00003d90| 63 61 6c 20 63 61 6c 6c | 20 74 6f 20 74 68 69 73 |cal call| to this|
|00003da0| 20 70 72 6f 63 65 64 75 | 72 65 20 6d 69 67 68 74 | procedu|re might|
|00003db0| 20 6c 6f 6f 6b 20 6c 69 | 6b 65 20 74 68 69 73 3a | look li|ke this:|
|00003dc0| 20 20 6f 70 65 6e 63 68 | 61 6e 6e 65 6c 28 31 35 | opench|annel(15|
|00003dd0| 29 3b 0d 0d 20 66 75 6e | 63 74 69 6f 6e 20 67 65 |);.. fun|ction ge|
|00003de0| 74 63 68 61 6e 6e 65 6c | 73 6f 75 6e 64 20 28 74 |tchannel|sound (t|
|00003df0| 68 65 6f 6e 65 3a 20 69 | 6e 74 65 67 65 72 29 3a |heone: i|nteger):|
|00003e00| 20 68 61 6e 64 6c 65 3b | 0d 0d 54 68 69 73 20 66 | handle;|..This f|
|00003e10| 75 6e 63 74 69 6f 6e 20 | 6c 6f 61 64 73 20 74 68 |unction |loads th|
|00003e20| 65 20 73 6f 75 6e 64 20 | 72 65 73 6f 75 72 63 65 |e sound |resource|
|00003e30| 20 74 68 61 74 20 68 61 | 73 20 74 68 65 20 49 44 | that ha|s the ID|
|00003e40| 20 79 6f 75 20 73 70 65 | 63 69 66 79 20 77 69 74 | you spe|cify wit|
|00003e50| 68 20 74 68 65 6f 6e 65 | 2e 20 20 49 74 20 70 61 |h theone|. It pa|
|00003e60| 73 73 65 73 20 61 20 68 | 61 6e 64 6c 65 20 62 61 |sses a h|andle ba|
|00003e70| 63 6b 20 74 6f 20 61 20 | 76 61 72 69 61 62 6c 65 |ck to a |variable|
|00003e80| 2c 20 77 68 69 63 68 20 | 63 61 6e 20 74 68 65 6e |, which |can then|
|00003e90| 20 62 65 20 75 73 65 64 | 20 77 69 74 68 20 70 6c | be used| with pl|
|00003ea0| 61 79 73 6f 75 6e 64 63 | 68 61 6e 6e 65 6c 7b 64 |aysoundc|hannel{d|
|00003eb0| 65 73 63 72 69 62 65 64 | 20 62 65 6c 6f 77 7d 2e |escribed| below}.|
|00003ec0| 20 0d 0d 20 70 72 6f 63 | 65 64 75 72 65 20 70 6c | .. proc|edure pl|
|00003ed0| 61 79 73 6f 75 6e 64 63 | 68 61 6e 6e 65 6c 20 28 |aysoundc|hannel (|
|00003ee0| 73 6e 64 3a 20 68 61 6e | 64 6c 65 3b 20 74 68 65 |snd: han|dle; the|
|00003ef0| 63 68 61 6e 3a 20 69 6e | 74 65 67 65 72 3b 20 69 |chan: in|teger; i|
|00003f00| 66 61 73 79 6e 63 3a 20 | 62 6f 6f 6c 65 61 6e 29 |fasync: |boolean)|
|00003f10| 3b 0d 0d 54 68 69 73 20 | 70 72 6f 63 65 64 75 72 |;..This |procedur|
|00003f20| 65 20 70 6c 61 79 73 20 | 61 20 73 6f 75 6e 64 20 |e plays |a sound |
|00003f30| 79 6f 75 20 73 70 65 63 | 69 66 79 20 74 68 72 6f |you spec|ify thro|
|00003f40| 75 67 68 20 74 68 65 20 | 63 68 61 6e 6e 65 6c 20 |ugh the |channel |
|00003f50| 79 6f 75 20 73 70 65 63 | 69 66 79 2e 20 20 53 6e |you spec|ify. Sn|
|00003f60| 64 20 73 68 6f 75 6c 64 | 20 62 65 20 61 20 76 61 |d should| be a va|
|00003f70| 72 69 61 62 6c 65 20 6f | 66 20 74 79 70 65 20 68 |riable o|f type h|
|00003f80| 61 6e 64 6c 65 20 74 68 | 61 74 20 73 68 6f 75 6c |andle th|at shoul|
|00003f90| 64 20 68 61 76 65 20 62 | 65 65 6e 20 75 73 65 64 |d have b|een used|
|00003fa0| 20 69 6e 20 63 6f 6e 6a | 75 6e 63 74 69 6f 6e 20 | in conj|unction |
|00003fb0| 77 69 74 68 20 67 65 74 | 63 68 61 6e 6e 65 6c 73 |with get|channels|
|00003fc0| 6f 75 6e 64 20 74 6f 20 | 6c 6f 61 64 20 61 20 73 |ound to |load a s|
|00003fd0| 6f 75 6e 64 20 69 6e 74 | 6f 20 69 74 2e 20 20 54 |ound int|o it. T|
|00003fe0| 68 65 63 68 61 6e 20 69 | 73 20 61 20 6e 75 6d 62 |hechan i|s a numb|
|00003ff0| 65 72 20 66 72 6f 6d 20 | 31 20 74 6f 20 32 30 20 |er from |1 to 20 |
|00004000| 74 68 61 74 20 73 70 65 | 63 69 66 69 65 73 20 77 |that spe|cifies w|
|00004010| 68 69 63 68 20 63 68 61 | 6e 6e 65 6c 20 74 6f 20 |hich cha|nnel to |
|00004020| 70 6c 61 79 20 74 68 65 | 20 73 6f 75 6e 64 20 74 |play the| sound t|
|00004030| 68 72 6f 75 67 68 2e 20 | 4d 61 6b 65 20 73 75 72 |hrough. |Make sur|
|00004040| 65 20 79 6f 75 20 68 61 | 76 65 20 6f 70 65 6e 65 |e you ha|ve opene|
|00004050| 64 20 74 68 65 20 63 68 | 61 6e 6e 65 6c 20 62 65 |d the ch|annel be|
|00004060| 66 6f 72 65 20 79 6f 75 | 20 74 72 79 20 61 6e 64 |fore you| try and|
|00004070| 20 70 6c 61 79 20 74 68 | 72 6f 75 67 68 20 69 74 | play th|rough it|
|00004080| 21 21 21 21 21 21 20 20 | 49 66 61 73 79 6e 63 20 |!!!!!! |Ifasync |
|00004090| 73 68 6f 75 6c 64 20 62 | 65 20 74 72 75 65 20 69 |should b|e true i|
|000040a0| 66 20 79 6f 75 20 77 61 | 6e 74 20 79 6f 75 72 20 |f you wa|nt your |
|000040b0| 73 6f 75 6e 64 20 74 6f | 20 70 6c 61 79 20 77 68 |sound to| play wh|
|000040c0| 69 6c 65 20 74 68 65 20 | 70 72 6f 67 72 61 6d 20 |ile the |program |
|000040d0| 63 6f 6e 74 69 6e 75 65 | 73 20 74 6f 20 72 75 6e |continue|s to run|
|000040e0| 2c 20 6f 72 20 66 61 6c | 73 65 20 69 66 20 79 6f |, or fal|se if yo|
|000040f0| 75 20 77 61 6e 74 20 79 | 6f 75 72 20 70 72 6f 67 |u want y|our prog|
|00004100| 72 61 6d 20 74 6f 20 73 | 74 6f 70 20 61 6e 64 20 |ram to s|top and |
|00004110| 77 61 69 74 20 75 6e 74 | 69 6c 20 74 68 65 20 73 |wait unt|il the s|
|00004120| 6f 75 6e 64 20 69 73 20 | 64 6f 6e 65 20 70 6c 61 |ound is |done pla|
|00004130| 79 69 6e 67 2e 20 20 48 | 65 72 65 20 69 73 20 61 |ying. H|ere is a|
|00004140| 6e 20 65 78 61 6d 70 6c | 65 20 6f 66 20 74 68 69 |n exampl|e of thi|
|00004150| 73 20 70 72 6f 63 65 64 | 75 72 65 20 62 65 69 6e |s proced|ure bein|
|00004160| 67 20 75 73 65 64 3a 20 | 20 70 6c 61 79 73 6f 75 |g used: | playsou|
|00004170| 6e 64 63 68 61 6e 6e 65 | 6c 28 74 65 73 74 73 6f |ndchanne|l(testso|
|00004180| 75 6e 64 2c 34 2c 74 72 | 75 65 29 3b 20 0d 0d 20 |und,4,tr|ue); .. |
|00004190| 70 72 6f 63 65 64 75 72 | 65 20 6b 69 6c 6c 63 68 |procedur|e killch|
|000041a0| 61 6e 6e 65 6c 20 28 74 | 68 65 63 68 61 6e 3a 20 |annel (t|hechan: |
|000041b0| 69 6e 74 65 67 65 72 3b | 20 69 66 61 73 79 6e 63 |integer;| ifasync|
|000041c0| 3a 20 62 6f 6f 6c 65 61 | 6e 29 3b 0d 0d 54 68 69 |: boolea|n);..Thi|
|000041d0| 73 20 70 72 6f 63 65 64 | 75 72 65 20 6b 69 6c 6c |s proced|ure kill|
|000041e0| 73 20 61 20 63 68 61 6e | 6e 65 6c 20 73 70 65 63 |s a chan|nel spec|
|000041f0| 69 66 69 65 64 20 77 69 | 74 68 20 74 68 65 63 68 |ified wi|th thech|
|00004200| 61 6e 7b 77 68 69 63 68 | 20 73 68 6f 75 6c 64 20 |an{which| should |
|00004210| 62 65 20 61 20 6e 75 6d | 62 65 72 20 66 72 6f 6d |be a num|ber from|
|00004220| 20 31 20 74 6f 20 32 30 | 7d 2e 20 20 41 66 74 65 | 1 to 20|}. Afte|
|00004230| 72 20 74 68 69 73 20 70 | 72 6f 63 65 64 75 72 65 |r this p|rocedure|
|00004240| 20 68 61 73 20 62 65 65 | 6e 20 75 73 65 64 20 6f | has bee|n used o|
|00004250| 6e 20 61 20 63 68 61 6e | 6e 65 6c 2c 20 69 74 20 |n a chan|nel, it |
|00004260| 69 73 20 61 73 20 69 66 | 20 74 68 61 74 20 63 68 |is as if| that ch|
|00004270| 61 6e 6e 65 6c 20 68 61 | 64 20 6e 65 76 65 72 20 |annel ha|d never |
|00004280| 62 65 65 6e 20 6f 70 65 | 6e 65 64 2e 20 20 49 66 |been ope|ned. If|
|00004290| 20 61 20 73 6f 75 6e 64 | 20 69 73 20 70 6c 61 79 | a sound| is play|
|000042a0| 69 6e 67 20 74 68 72 6f | 75 67 68 20 74 68 65 20 |ing thro|ugh the |
|000042b0| 63 68 61 6e 6e 65 6c 20 | 74 6f 20 62 65 20 6b 69 |channel |to be ki|
|000042c0| 6c 6c 65 64 20 77 68 69 | 6c 65 20 69 74 20 69 73 |lled whi|le it is|
|000042d0| 20 62 65 69 6e 67 20 6b | 69 6c 6c 65 64 2c 20 74 | being k|illed, t|
|000042e0| 68 65 20 73 6f 75 6e 64 | 20 77 69 6c 6c 20 62 65 |he sound| will be|
|000042f0| 20 74 65 72 6d 69 6e 61 | 74 65 64 2e 0d 0d 0d 0d | termina|ted.....|
|00004300| 52 65 6c 65 76 65 6e 74 | 20 47 52 41 46 20 44 61 |Relevent| GRAF Da|
|00004310| 74 61 20 53 74 72 75 63 | 74 75 72 65 73 3a 0d 0d |ta Struc|tures:..|
|00004320| 20 74 79 70 65 0d 20 20 | 47 52 41 46 70 6f 72 74 | type. |GRAFport|
|00004330| 20 3d 20 72 65 63 6f 72 | 64 0d 20 20 20 20 74 68 | = recor|d. th|
|00004340| 65 70 6f 72 74 3a 20 47 | 57 50 74 72 3b 0d 20 20 |eport: G|WPtr;. |
|00004350| 20 20 74 68 65 72 65 63 | 74 3a 20 72 65 63 74 3b | therec|t: rect;|
|00004360| 0d 20 20 20 65 6e 64 3b | 0d 0d 54 68 65 20 62 61 |. end;|..The ba|
|00004370| 63 6b 67 72 6f 75 6e 64 | 2c 20 61 6e 64 20 61 6c |ckground|, and al|
|00004380| 6c 20 6f 74 68 65 72 20 | 72 65 6c 65 76 65 6e 74 |l other |relevent|
|00004390| 20 6f 66 66 73 63 72 65 | 65 6e 20 67 72 61 70 68 | offscre|en graph|
|000043a0| 69 63 73 20 77 6f 72 6c | 64 73 20 75 73 65 64 20 |ics worl|ds used |
|000043b0| 61 72 65 20 6f 66 20 74 | 79 70 65 20 47 52 41 46 |are of t|ype GRAF|
|000043c0| 70 6f 72 74 2e 20 20 44 | 6f 6e 27 74 20 66 69 64 |port. D|on't fid|
|000043d0| 64 6c 65 20 77 69 74 68 | 20 74 68 69 73 2e 20 0d |dle with| this. .|
|000043e0| 0d 20 20 66 61 63 65 20 | 3d 20 72 65 63 6f 72 64 |. face |= record|
|000043f0| 0d 20 20 20 20 74 68 65 | 74 79 70 65 3a 20 69 6e |. the|type: in|
|00004400| 74 65 67 65 72 3b 0d 20 | 20 20 20 74 68 65 70 69 |teger;. | thepi|
|00004410| 63 74 2c 20 74 68 65 6d | 61 73 6b 70 69 63 74 3a |ct, them|askpict:|
|00004420| 20 70 69 63 68 61 6e 64 | 6c 65 3b 0d 20 20 20 20 | pichand|le;. |
|00004430| 74 68 65 63 69 63 6f 6e | 3a 20 63 69 63 6f 6e 68 |thecicon|: ciconh|
|00004440| 61 6e 64 6c 65 3b 0d 20 | 20 20 20 72 65 73 4e 75 |andle;. | resNu|
|00004450| 6d 2c 20 70 69 63 74 72 | 65 73 6e 75 6d 2c 20 6d |m, pictr|esnum, m|
|00004460| 61 73 6b 72 65 73 6e 75 | 6d 2c 20 6f 6c 64 72 65 |askresnu|m, oldre|
|00004470| 73 4e 75 6d 3a 20 69 6e | 74 65 67 65 72 3b 0d 20 |sNum: in|teger;. |
|00004480| 20 20 20 73 6f 75 72 63 | 65 72 65 63 74 3a 20 72 | sourc|erect: r|
|00004490| 65 63 74 3b 0d 20 20 20 | 20 73 69 7a 65 72 65 63 |ect;. | sizerec|
|000044a0| 74 3a 20 72 65 63 74 3b | 0d 20 20 20 20 63 6f 6c |t: rect;|. col|
|000044b0| 6c 69 73 69 6f 6e 73 69 | 7a 65 3a 20 72 65 63 74 |lisionsi|ze: rect|
|000044c0| 3b 0d 20 20 20 65 6e 64 | 3b 0d 0d 45 61 63 68 20 |;. end|;..Each |
|000044d0| 66 61 63 65 20 69 73 20 | 73 65 74 20 75 70 20 6c |face is |set up l|
|000044e0| 69 6b 65 20 74 68 69 73 | 2e 20 20 74 68 65 74 79 |ike this|. thety|
|000044f0| 70 65 20 69 73 20 73 65 | 74 20 74 6f 20 31 20 69 |pe is se|t to 1 i|
|00004500| 66 20 74 68 65 20 66 61 | 63 65 20 69 73 20 61 20 |f the fa|ce is a |
|00004510| 63 69 63 6e 2c 20 61 6e | 64 20 32 20 69 66 20 69 |cicn, an|d 2 if i|
|00004520| 74 20 69 73 20 61 20 50 | 49 43 54 2e 20 20 74 68 |t is a P|ICT. th|
|00004530| 65 70 69 63 74 20 61 6e | 64 20 74 68 65 6d 61 73 |epict an|d themas|
|00004540| 6b 70 69 63 74 20 61 72 | 65 20 75 73 65 64 20 66 |kpict ar|e used f|
|00004550| 6f 72 20 50 49 43 54 20 | 66 61 63 65 73 2c 20 77 |or PICT |faces, w|
|00004560| 68 69 63 68 20 61 72 65 | 20 6e 6f 74 20 65 78 70 |hich are| not exp|
|00004570| 6c 61 69 6e 65 64 20 69 | 6e 20 74 68 69 73 20 6d |lained i|n this m|
|00004580| 61 6e 75 61 6c 2e 20 20 | 74 68 65 63 69 63 6f 6e |anual. |thecicon|
|00004590| 20 69 73 20 61 20 68 61 | 6e 64 6c 65 20 74 6f 20 | is a ha|ndle to |
|000045a0| 74 68 65 20 63 69 63 6f | 6e 20 74 68 61 74 20 74 |the cico|n that t|
|000045b0| 68 65 20 66 61 63 65 20 | 75 73 65 73 2e 20 20 72 |he face |uses. r|
|000045c0| 65 73 6e 75 6d 20 69 73 | 20 74 68 65 20 72 65 73 |esnum is| the res|
|000045d0| 6f 75 72 63 65 20 49 44 | 20 6e 75 6d 62 65 72 20 |ource ID| number |
|000045e0| 6f 66 20 74 68 65 20 63 | 69 63 6e 20 6f 72 20 50 |of the c|icn or P|
|000045f0| 49 43 54 20 75 73 65 64 | 20 66 6f 72 20 74 68 61 |ICT used| for tha|
|00004600| 74 20 66 61 63 65 2e 20 | 20 53 6f 75 72 63 65 72 |t face. | Sourcer|
|00004610| 65 63 74 20 69 73 20 6f | 6e 6c 79 20 75 73 65 64 |ect is o|nly used|
|00004620| 20 66 6f 72 20 50 49 43 | 54 73 2e 20 20 53 69 7a | for PIC|Ts. Siz|
|00004630| 65 72 65 63 74 20 69 73 | 20 74 68 65 20 73 69 7a |erect is| the siz|
|00004640| 65 20 79 6f 75 20 77 61 | 6e 74 20 79 6f 75 72 20 |e you wa|nt your |
|00004650| 66 61 63 65 20 74 6f 20 | 62 65 20 6f 6e 20 74 68 |face to |be on th|
|00004660| 65 20 73 63 72 65 65 6e | 2e 20 49 66 20 79 6f 75 |e screen|. If you|
|00004670| 20 73 65 74 20 69 74 20 | 74 6f 20 61 20 73 69 7a | set it |to a siz|
|00004680| 65 20 74 68 61 74 20 69 | 73 20 6c 61 72 67 65 72 |e that i|s larger|
|00004690| 20 74 68 61 6e 20 74 68 | 65 20 61 63 74 75 61 6c | than th|e actual|
|000046a0| 20 63 69 63 6e 20 6f 72 | 20 50 49 43 54 2c 20 69 | cicn or| PICT, i|
|000046b0| 74 20 77 69 6c 6c 20 73 | 63 61 6c 65 20 79 6f 75 |t will s|cale you|
|000046c0| 72 20 66 61 63 65 20 6c | 61 72 67 65 72 20 66 6f |r face l|arger fo|
|000046d0| 72 20 79 6f 75 2e 20 20 | 43 6f 6c 6c 69 73 69 6f |r you. |Collisio|
|000046e0| 6e 73 69 7a 65 20 69 73 | 20 74 68 65 20 72 65 63 |nsize is| the rec|
|000046f0| 74 20 73 69 7a 65 20 74 | 6f 20 62 65 20 75 73 65 |t size t|o be use|
|00004700| 64 20 77 68 65 6e 20 47 | 52 41 46 20 74 65 73 74 |d when G|RAF test|
|00004710| 73 20 66 6f 72 20 63 6f | 6c 6c 69 73 69 6f 6e 73 |s for co|llisions|
|00004720| 20 62 65 74 77 65 65 6e | 20 73 70 72 69 74 65 73 | between| sprites|
|00004730| 2e 20 20 56 65 72 79 20 | 6f 66 74 65 6e 2c 20 74 |. Very |often, t|
|00004740| 68 65 20 63 6f 6c 6c 69 | 73 69 6f 6e 73 69 7a 65 |he colli|sionsize|
|00004750| 20 72 65 63 74 20 77 69 | 6c 6c 20 62 65 20 73 6d | rect wi|ll be sm|
|00004760| 61 6c 6c 65 72 20 74 68 | 61 6e 20 73 69 7a 65 72 |aller th|an sizer|
|00004770| 65 63 74 2e 20 20 53 65 | 65 20 47 52 41 46 2e 41 |ect. Se|e GRAF.A|
|00004780| 72 63 61 64 65 20 66 6f | 72 20 6d 6f 72 65 20 61 |rcade fo|r more a|
|00004790| 64 76 61 6e 63 65 64 20 | 75 73 65 73 20 6f 66 20 |dvanced |uses of |
|000047a0| 74 68 65 73 65 20 72 65 | 63 74 73 2e 20 20 46 6f |these re|cts. Fo|
|000047b0| 72 20 6d 61 6b 69 6e 67 | 20 61 6e 69 6d 61 74 69 |r making| animati|
|000047c0| 6f 6e 20 73 65 71 75 65 | 6e 63 65 73 2c 20 79 6f |on seque|nces, yo|
|000047d0| 75 20 77 69 6c 6c 20 70 | 72 6f 62 61 62 6c 79 20 |u will p|robably |
|000047e0| 77 61 6e 74 20 74 6f 20 | 66 6c 69 70 20 74 68 72 |want to |flip thr|
|000047f0| 6f 75 67 68 20 61 20 62 | 75 6e 63 68 20 6f 66 20 |ough a b|unch of |
|00004800| 66 61 63 65 73 20 69 6e | 20 66 61 73 74 20 73 65 |faces in| fast se|
|00004810| 71 75 65 6e 63 65 2e 20 | 20 53 65 65 20 74 68 65 |quence. | See the|
|00004820| 20 47 52 41 46 2e 43 6f | 6c 6c 69 73 69 6f 6e 73 | GRAF.Co|llisions|
|00004830| 20 64 65 6d 6f 20 66 6f | 72 20 64 6f 69 6e 67 20 | demo fo|r doing |
|00004840| 74 68 69 73 20 75 73 69 | 6e 67 20 74 68 65 20 6d |this usi|ng the m|
|00004850| 6f 64 65 20 66 69 65 6c | 64 20 7b 65 78 70 6c 61 |ode fiel|d {expla|
|00004860| 69 6e 65 64 20 62 65 6c | 6f 77 7d 20 61 6e 64 20 |ined bel|ow} and |
|00004870| 74 68 65 20 6d 61 74 68 | 20 6f 70 65 72 61 74 6f |the math| operato|
|00004880| 72 20 4d 4f 44 2e 20 20 | 4d 4f 44 20 72 65 74 75 |r MOD. |MOD retu|
|00004890| 72 6e 73 20 74 68 65 20 | 72 65 6d 61 69 6e 64 65 |rns the |remainde|
|000048a0| 72 20 6f 66 20 61 20 64 | 69 76 69 73 69 6f 6e 20 |r of a d|ivision |
|000048b0| 70 72 6f 62 6c 65 6d 2e | 20 20 46 6f 72 20 65 78 |problem.| For ex|
|000048c0| 61 6d 70 6c 65 2c 20 36 | 20 4d 4f 44 20 33 20 77 |ample, 6| MOD 3 w|
|000048d0| 6f 75 6c 64 20 72 65 74 | 75 72 6e 20 7a 65 72 6f |ould ret|urn zero|
|000048e0| 2c 20 62 65 63 61 75 73 | 65 20 33 20 64 69 76 69 |, becaus|e 3 divi|
|000048f0| 64 65 73 20 65 76 65 6e | 6c 79 20 69 6e 74 6f 20 |des even|ly into |
|00004900| 36 2e 20 20 4f 6e 20 74 | 68 65 20 6f 74 68 65 72 |6. On t|he other|
|00004910| 20 68 61 6e 64 2c 20 37 | 20 4d 4f 44 20 33 20 77 | hand, 7| MOD 3 w|
|00004920| 6f 75 6c 64 20 72 65 74 | 75 72 6e 20 31 2c 20 62 |ould ret|urn 1, b|
|00004930| 65 63 61 75 73 65 20 74 | 68 72 65 65 20 66 69 74 |ecause t|hree fit|
|00004940| 73 20 74 77 69 63 65 20 | 69 6e 74 6f 20 37 20 77 |s twice |into 7 w|
|00004950| 69 74 68 20 61 20 72 65 | 6d 61 69 6e 64 65 72 20 |ith a re|mainder |
|00004960| 6f 66 20 31 2e 0d 0d 20 | 20 73 70 72 69 74 65 20 |of 1... | sprite |
|00004970| 3d 20 72 65 63 6f 72 64 | 0d 20 20 20 20 6b 69 6e |= record|. kin|
|00004980| 64 3a 20 49 6e 74 65 67 | 65 72 3b 20 7b 20 55 73 |d: Integ|er; { Us|
|00004990| 65 64 20 66 6f 72 20 69 | 64 65 6e 74 69 66 69 63 |ed for i|dentific|
|000049a0| 61 74 69 6f 6e 2e 20 69 | 66 20 74 68 65 79 27 72 |ation. i|f they'r|
|000049b0| 65 20 64 69 66 66 65 72 | 65 6e 74 20 66 72 6f 6d |e differ|ent from|
|000049c0| 20 65 61 63 68 20 6f 74 | 68 65 72 2c 20 74 68 65 | each ot|her, the|
|000049d0| 79 27 72 65 20 65 6e 65 | 6d 69 65 73 20 7d 0d 20 |y're ene|mies }. |
|000049e0| 20 20 20 70 6f 73 69 74 | 69 6f 6e 3a 20 50 6f 69 | posit|ion: Poi|
|000049f0| 6e 74 3b 0d 20 20 20 20 | 74 68 65 66 61 63 65 3a |nt;. |theface:|
|00004a00| 20 46 61 63 65 3b 09 09 | 09 7b 20 50 6f 69 6e 74 | Face;..|.{ Point|
|00004a10| 65 72 20 74 6f 20 74 68 | 65 20 46 61 63 65 20 28 |er to th|e Face (|
|00004a20| 61 70 70 65 61 72 61 6e | 63 65 29 20 74 6f 20 62 |appearan|ce) to b|
|00004a30| 65 20 75 73 65 64 2e 20 | 7d 0d 20 20 20 20 74 61 |e used. |}. ta|
|00004a40| 73 6b 3a 20 50 72 6f 63 | 50 74 72 3b 09 09 09 7b |sk: Proc|Ptr;...{|
|00004a50| 20 43 61 6c 6c 62 61 63 | 6b 2d 72 6f 75 74 69 6e | Callbac|k-routin|
|00004a60| 65 2c 20 63 61 6c 6c 65 | 64 20 6f 6e 63 65 20 70 |e, calle|d once p|
|00004a70| 65 72 20 66 72 61 6d 65 | 2e 20 7d 0d 20 20 20 20 |er frame|. }. |
|00004a80| 68 69 74 54 61 73 6b 3a | 20 50 72 6f 63 50 74 72 |hitTask:| ProcPtr|
|00004a90| 3b 09 09 7b 20 43 61 6c | 6c 62 61 63 6b 20 69 6e |;..{ Cal|lback in|
|00004aa0| 20 63 6f 6c 6c 69 73 69 | 6f 6e 73 2e 20 7d 0d 20 | collisi|ons. }. |
|00004ab0| 20 20 20 6e 65 78 74 2c | 20 70 72 65 76 2c 20 74 | next,| prev, t|
|00004ac0| 68 69 73 69 73 3a 20 69 | 6e 74 65 67 65 72 3b 20 |hisis: i|nteger; |
|00004ad0| 7b 69 6e 74 65 72 6e 61 | 6c 3b 20 64 6f 6e 27 74 |{interna|l; don't|
|00004ae0| 20 63 68 61 6e 67 65 21 | 7d 0d 20 20 20 20 6e 65 | change!|}. ne|
|00004af0| 77 70 6c 61 63 65 2c 20 | 6f 6c 64 70 6c 61 63 65 |wplace, |oldplace|
|00004b00| 2c 20 63 6f 6c 6c 69 73 | 69 6f 6e 70 6c 61 63 65 |, collis|ionplace|
|00004b10| 3a 20 72 65 63 74 3b 20 | 20 7b 69 6e 74 65 72 6e |: rect; | {intern|
|00004b20| 61 6c 3b 20 64 6f 6e 27 | 74 20 63 68 61 6e 67 65 |al; don'|t change|
|00004b30| 21 7d 0d 20 20 20 20 73 | 70 65 65 64 3a 20 50 6f |!}. s|peed: Po|
|00004b40| 69 6e 74 3b 20 7b 20 43 | 61 6e 20 62 65 20 75 73 |int; { C|an be us|
|00004b50| 65 64 20 66 6f 72 20 73 | 70 65 65 64 2c 20 62 75 |ed for s|peed, bu|
|00004b60| 74 20 6e 6f 74 20 6e 65 | 63 65 73 73 61 72 69 6c |t not ne|cessaril|
|00004b70| 79 2e 20 7d 0d 20 20 20 | 20 6c 61 79 65 72 3a 20 |y. }. | layer: |
|00004b80| 69 6e 74 65 67 65 72 3b | 20 7b 46 6f 72 20 6c 61 |integer;| {For la|
|00004b90| 79 65 72 2d 73 6f 72 74 | 69 6e 67 2e 20 57 68 65 |yer-sort|ing. Whe|
|00004ba0| 6e 20 6e 6f 74 20 75 73 | 65 64 20 66 6f 72 20 74 |n not us|ed for t|
|00004bb0| 68 61 74 2c 20 75 73 65 | 20 66 72 65 65 6c 79 2e |hat, use| freely.|
|00004bc0| 7d 0d 20 20 20 20 69 73 | 74 68 65 72 65 3a 20 69 |}. is|there: i|
|00004bd0| 6e 74 65 67 65 72 3b 20 | 7b 69 6e 74 65 72 6e 61 |nteger; |{interna|
|00004be0| 6c 3b 20 64 6f 6e 27 74 | 20 63 68 61 6e 67 65 21 |l; don't| change!|
|00004bf0| 7d 0d 20 20 20 20 63 6f | 6c 6c 69 73 69 6f 6e 77 |}. co|llisionw|
|00004c00| 69 74 68 3a 20 69 6e 74 | 65 67 65 72 3b 0d 20 20 |ith: int|eger;. |
|00004c10| 20 20 77 68 61 74 73 63 | 72 6e 69 73 72 65 63 74 | whatsc|rnisrect|
|00004c20| 3a 20 69 6e 74 65 67 65 | 72 3b 0d 20 20 20 20 6b |: intege|r;. k|
|00004c30| 69 6c 6c 73 70 72 69 74 | 65 66 6c 61 67 3a 20 62 |illsprit|eflag: b|
|00004c40| 6f 6f 6c 65 61 6e 3b 7b | 69 6e 74 65 72 6e 61 6c |oolean;{|internal|
|00004c50| 3b 20 64 6f 6e 27 74 20 | 63 68 61 6e 67 65 21 7d |; don't |change!}|
|00004c60| 0d 20 20 20 20 6d 6f 64 | 65 3a 20 69 6e 74 65 67 |. mod|e: integ|
|00004c70| 65 72 3b 0d 20 20 20 20 | 69 73 64 6f 6e 65 3a 20 |er;. |isdone: |
|00004c80| 62 6f 6f 6c 65 61 6e 3b | 7b 69 6e 74 65 72 6e 61 |boolean;|{interna|
|00004c90| 6c 3b 20 64 6f 6e 27 74 | 20 63 68 61 6e 67 65 21 |l; don't| change!|
|00004ca0| 7d 0d 20 20 20 20 65 78 | 74 72 61 2c 20 65 78 74 |}. ex|tra, ext|
|00004cb0| 72 61 32 2c 20 65 78 74 | 72 61 33 2c 20 65 78 74 |ra2, ext|ra3, ext|
|00004cc0| 72 61 34 2c 20 65 78 74 | 72 61 35 3a 20 69 6e 74 |ra4, ext|ra5: int|
|00004cd0| 65 67 65 72 3b 0d 20 20 | 20 20 65 78 74 72 61 62 |eger;. | extrab|
|00004ce0| 6f 6c 2c 20 65 78 74 72 | 61 62 6f 6c 32 3a 20 62 |ol, extr|abol2: b|
|00004cf0| 6f 6f 6c 65 61 6e 3b 0d | 20 20 20 20 62 62 3a 20 |oolean;.| bb: |
|00004d00| 69 6e 74 65 67 65 72 3b | 0d 20 20 20 65 6e 64 3b |integer;|. end;|
|00004d10| 0d 0d 45 61 63 68 20 73 | 70 72 69 74 65 20 69 73 |..Each s|prite is|
|00004d20| 20 6d 61 64 65 20 75 70 | 20 6f 66 20 74 68 65 20 | made up| of the |
|00004d30| 72 65 63 6f 72 64 20 61 | 62 6f 76 65 2e 20 20 54 |record a|bove. T|
|00004d40| 68 65 20 6b 69 6e 64 20 | 66 69 65 6c 64 20 69 73 |he kind |field is|
|00004d50| 20 65 78 70 6c 61 69 6e | 65 64 20 75 6e 64 65 72 | explain|ed under|
|00004d60| 20 74 68 65 20 72 6f 75 | 74 69 6e 65 20 4e 65 77 | the rou|tine New|
|00004d70| 53 70 72 69 74 65 20 7b | 61 62 6f 76 65 7d 2e 20 |Sprite {|above}. |
|00004d80| 20 50 6f 73 69 74 69 6f | 6e 20 69 73 20 61 20 70 | Positio|n is a p|
|00004d90| 6f 69 6e 74 20 73 68 6f | 77 69 6e 67 20 77 68 65 |oint sho|wing whe|
|00004da0| 72 65 20 74 68 65 20 75 | 70 70 65 72 20 6c 65 66 |re the u|pper lef|
|00004db0| 74 20 63 6f 72 6e 65 72 | 20 6f 66 20 74 68 65 20 |t corner| of the |
|00004dc0| 73 70 72 69 74 65 20 69 | 73 2e 20 20 50 6f 73 69 |sprite i|s. Posi|
|00004dd0| 74 69 6f 6e 2e 68 20 69 | 73 20 74 68 65 20 68 6f |tion.h i|s the ho|
|00004de0| 72 69 7a 6f 6e 74 61 6c | 20 70 6f 73 69 74 69 6f |rizontal| positio|
|00004df0| 6e 2c 20 61 6e 64 20 50 | 6f 73 69 74 69 6f 6e 2e |n, and P|osition.|
|00004e00| 76 20 69 73 20 74 68 65 | 20 76 65 72 74 69 63 61 |v is the| vertica|
|00004e10| 6c 20 70 6f 73 69 74 69 | 6f 6e 2e 20 20 56 45 52 |l positi|on. VER|
|00004e20| 59 20 49 4d 50 4f 52 54 | 41 4e 54 3a 20 49 4e 20 |Y IMPORT|ANT: IN |
|00004e30| 54 48 45 20 54 41 53 4b | 20 41 4e 44 20 43 4f 4c |THE TASK| AND COL|
|00004e40| 4c 49 53 49 4f 4e 54 41 | 53 4b 20 50 52 4f 43 45 |LISIONTA|SK PROCE|
|00004e50| 44 55 52 45 53 2c 20 59 | 4f 55 20 4d 55 53 54 20 |DURES, Y|OU MUST |
|00004e60| 43 48 41 4e 47 45 20 54 | 48 45 20 50 4f 53 49 54 |CHANGE T|HE POSIT|
|00004e70| 49 4f 4e 20 56 41 52 49 | 41 42 4c 45 20 54 4f 20 |ION VARI|ABLE TO |
|00004e80| 4d 4f 56 45 20 54 48 45 | 20 53 50 52 49 54 45 20 |MOVE THE| SPRITE |
|00004e90| 4f 4e 20 54 48 45 20 53 | 43 52 45 45 4e 2e 20 20 |ON THE S|CREEN. |
|00004ea0| 53 65 65 20 74 68 65 20 | 64 65 6d 6f 73 2e 20 20 |See the |demos. |
|00004eb0| 54 61 73 6b 20 61 6e 64 | 20 68 69 74 54 61 73 6b |Task and| hitTask|
|00004ec0| 20 61 72 65 20 70 6f 69 | 6e 74 65 72 73 20 74 6f | are poi|nters to|
|00004ed0| 20 74 68 65 20 70 72 6f | 63 65 64 75 72 65 73 20 | the pro|cedures |
|00004ee0| 74 6f 20 62 65 20 63 61 | 6c 6c 65 64 2e 20 20 4e |to be ca|lled. N|
|00004ef0| 65 78 74 2c 20 70 72 65 | 76 2c 20 61 6e 64 20 74 |ext, pre|v, and t|
|00004f00| 68 69 73 69 73 20 61 72 | 65 20 6a 75 73 74 20 69 |hisis ar|e just i|
|00004f10| 6e 74 65 72 6e 61 6c 20 | 76 61 72 69 61 62 6c 65 |nternal |variable|
|00004f20| 73 2e 20 44 6f 6e 27 74 | 20 63 68 61 6e 67 65 20 |s. Don't| change |
|00004f30| 74 68 65 6d 3b 20 79 6f | 75 20 77 69 6c 6c 20 6d |them; yo|u will m|
|00004f40| 65 73 73 20 65 76 65 72 | 79 74 68 69 6e 67 20 75 |ess ever|ything u|
|00004f50| 70 2e 20 20 4e 65 77 70 | 6c 61 63 65 2c 20 6f 6c |p. Newp|lace, ol|
|00004f60| 64 70 6c 61 63 65 2c 20 | 61 6e 64 20 63 6f 6c 6c |dplace, |and coll|
|00004f70| 69 73 69 6f 6e 70 6c 61 | 63 65 20 61 72 65 20 61 |isionpla|ce are a|
|00004f80| 6c 73 6f 20 75 73 65 64 | 20 69 6e 74 65 72 6e 61 |lso used| interna|
|00004f90| 6c 6c 79 20 62 79 20 47 | 52 41 46 2c 20 61 6e 64 |lly by G|RAF, and|
|00004fa0| 20 73 68 6f 75 6c 64 20 | 6e 6f 74 20 62 65 20 63 | should |not be c|
|00004fb0| 68 61 6e 67 65 64 20 62 | 79 20 79 6f 75 72 20 61 |hanged b|y your a|
|00004fc0| 70 70 6c 69 63 61 74 69 | 6f 6e 2e 20 20 54 68 65 |pplicati|on. The|
|00004fd0| 20 73 70 65 65 64 20 66 | 69 65 6c 64 20 63 61 6e | speed f|ield can|
|00004fe0| 20 62 65 20 75 73 65 64 | 20 66 6f 72 20 73 65 74 | be used| for set|
|00004ff0| 74 69 6e 67 20 74 68 65 | 20 73 70 65 65 64 20 6f |ting the| speed o|
|00005000| 66 20 61 20 6d 6f 76 69 | 6e 67 20 73 70 72 69 74 |f a movi|ng sprit|
|00005010| 65 20 61 73 20 69 6e 20 | 47 52 41 46 2e 43 6f 6c |e as in |GRAF.Col|
|00005020| 6c 69 73 69 6f 6e 73 2c | 20 62 75 74 20 72 65 61 |lisions,| but rea|
|00005030| 6c 6c 79 20 63 61 6e 20 | 62 65 20 75 73 65 64 20 |lly can |be used |
|00005040| 66 6f 72 20 61 6e 79 74 | 68 69 6e 67 2e 20 20 54 |for anyt|hing. T|
|00005050| 68 65 20 6c 61 79 65 72 | 20 66 69 65 6c 64 20 69 |he layer| field i|
|00005060| 73 20 61 20 73 65 74 74 | 69 6e 67 20 74 68 61 74 |s a sett|ing that|
|00005070| 20 68 61 73 20 6e 6f 74 | 20 79 65 74 20 62 65 65 | has not| yet bee|
|00005080| 6e 20 69 6d 70 6c 65 6d | 65 6e 74 65 64 20 69 6e |n implem|ented in|
|00005090| 20 47 52 41 46 2c 20 73 | 6f 20 75 73 65 20 69 74 | GRAF, s|o use it|
|000050a0| 20 66 6f 72 20 61 6e 79 | 74 68 69 6e 67 20 79 6f | for any|thing yo|
|000050b0| 75 20 77 61 6e 74 2e 20 | 20 52 69 67 68 74 20 61 |u want. | Right a|
|000050c0| 66 74 65 72 20 43 6f 6c | 6c 69 73 69 6f 6e 74 65 |fter Col|lisionte|
|000050d0| 73 74 20 68 61 73 20 62 | 65 65 6e 20 63 61 6c 6c |st has b|een call|
|000050e0| 65 64 2c 20 69 66 20 61 | 20 73 70 72 69 74 65 20 |ed, if a| sprite |
|000050f0| 68 61 73 20 68 69 74 20 | 61 6e 6f 74 68 65 72 20 |has hit |another |
|00005100| 73 70 72 69 74 65 2c 20 | 69 74 73 20 63 6f 6c 6c |sprite, |its coll|
|00005110| 69 73 69 6f 6e 77 69 74 | 68 20 66 69 65 6c 64 20 |isionwit|h field |
|00005120| 77 69 6c 6c 20 63 6f 6e | 74 61 69 6e 20 61 6e 20 |will con|tain an |
|00005130| 69 6e 74 65 67 65 72 20 | 70 6f 69 6e 74 69 6e 67 |integer |pointing|
|00005140| 20 74 6f 20 74 68 65 20 | 61 72 72 61 79 20 6e 75 | to the |array nu|
|00005150| 6d 62 65 72 20 6f 66 20 | 74 68 65 20 73 70 72 69 |mber of |the spri|
|00005160| 74 65 20 69 74 20 63 6f | 6c 6c 69 64 65 64 20 77 |te it co|llided w|
|00005170| 69 74 68 2e 20 20 41 63 | 63 65 73 73 20 74 68 69 |ith. Ac|cess thi|
|00005180| 73 20 6f 74 68 65 72 20 | 73 70 72 69 74 65 20 62 |s other |sprite b|
|00005190| 79 20 75 73 69 6e 67 20 | 74 68 65 73 70 72 69 74 |y using |thesprit|
|000051a0| 65 5b 79 6f 75 72 73 70 | 72 69 74 65 2e 63 6f 6c |e[yoursp|rite.col|
|000051b0| 6c 69 73 69 6f 6e 77 69 | 74 68 5d 2c 20 77 68 65 |lisionwi|th], whe|
|000051c0| 72 65 20 79 6f 75 72 73 | 70 72 69 74 65 20 69 73 |re yours|prite is|
|000051d0| 20 74 68 65 20 6e 61 6d | 65 20 6f 66 20 74 68 65 | the nam|e of the|
|000051e0| 20 73 70 72 69 74 65 20 | 43 6f 6c 6c 69 73 69 6f | sprite |Collisio|
|000051f0| 6e 74 65 73 74 20 77 61 | 73 20 70 65 72 66 6f 72 |ntest wa|s perfor|
|00005200| 6d 65 64 20 6f 6e 2e 20 | 20 57 68 61 74 73 63 72 |med on. | Whatscr|
|00005210| 6e 69 73 72 65 63 74 20 | 69 73 20 61 6e 20 69 6e |nisrect |is an in|
|00005220| 74 65 67 65 72 20 77 68 | 6f 27 73 20 6e 6f 72 6d |teger wh|o's norm|
|00005230| 61 6c 20 64 65 66 61 6c | 74 20 69 73 20 31 2e 20 |al defal|t is 1. |
|00005240| 20 54 68 61 74 20 6d 65 | 61 6e 73 20 74 68 61 74 | That me|ans that|
|00005250| 20 61 6c 6c 20 73 70 72 | 69 74 65 73 20 61 72 65 | all spr|ites are|
|00005260| 20 64 72 61 77 6e 20 6f | 6e 20 73 63 72 65 65 6e | drawn o|n screen|
|00005270| 20 6f 6e 65 2c 20 77 68 | 69 63 68 20 69 73 20 74 | one, wh|ich is t|
|00005280| 68 65 20 63 75 72 72 65 | 6e 74 20 76 69 65 77 69 |he curre|nt viewi|
|00005290| 6e 67 20 73 63 72 65 65 | 6e 2e 20 20 49 66 20 79 |ng scree|n. If y|
|000052a0| 6f 75 20 73 65 74 20 67 | 47 52 41 46 2e 57 68 61 |ou set g|GRAF.Wha|
|000052b0| 74 73 63 72 6e 20 7b 62 | 65 6c 6f 77 7d 20 74 6f |tscrn {b|elow} to|
|000052c0| 20 32 20 66 6f 72 20 65 | 78 61 6d 70 6c 65 2c 20 | 2 for e|xample, |
|000052d0| 61 6e 64 20 74 68 65 6e | 20 64 72 61 77 20 61 20 |and then| draw a |
|000052e0| 6e 65 77 20 62 61 63 6b | 67 72 6f 75 6e 64 2c 20 |new back|ground, |
|000052f0| 47 52 41 46 20 77 69 6c | 6c 20 61 63 74 20 61 73 |GRAF wil|l act as|
|00005300| 20 69 66 20 79 6f 75 20 | 77 65 6e 74 20 69 6e 74 | if you |went int|
|00005310| 6f 20 61 20 6e 65 77 20 | 72 6f 6f 6d 2c 20 61 6e |o a new |room, an|
|00005320| 64 20 6f 6e 6c 79 20 74 | 68 6f 73 65 20 73 70 72 |d only t|hose spr|
|00005330| 69 74 65 73 20 77 68 6f | 73 65 20 77 68 61 74 73 |ites who|se whats|
|00005340| 63 72 6e 69 73 72 65 63 | 74 20 66 69 65 6c 64 73 |crnisrec|t fields|
|00005350| 20 68 61 76 65 20 62 65 | 65 6e 20 73 65 74 20 74 | have be|en set t|
|00005360| 6f 20 32 20 77 69 6c 6c | 20 62 65 20 64 72 61 77 |o 2 will| be draw|
|00005370| 6e 2e 20 20 44 6f 6e 27 | 74 20 74 6f 75 63 68 20 |n. Don'|t touch |
|00005380| 6b 69 6c 6c 73 70 72 69 | 74 65 66 6c 61 67 2e 20 |killspri|teflag. |
|00005390| 20 54 68 65 20 6d 6f 64 | 65 20 66 69 65 6c 64 20 | The mod|e field |
|000053a0| 75 73 75 61 6c 6c 79 20 | 69 73 20 75 73 65 64 20 |usually |is used |
|000053b0| 74 6f 20 66 6c 69 70 20 | 74 68 72 6f 75 67 68 20 |to flip |through |
|000053c0| 61 20 73 65 74 20 6f 66 | 20 66 61 63 65 73 20 66 |a set of| faces f|
|000053d0| 6f 72 20 61 20 73 70 72 | 69 74 65 20 61 73 20 64 |or a spr|ite as d|
|000053e0| 65 6d 6f 6e 73 74 72 61 | 74 65 64 20 69 6e 20 47 |emonstra|ted in G|
|000053f0| 52 41 46 2e 43 6f 6c 6c | 69 73 69 6f 6e 73 20 61 |RAF.Coll|isions a|
|00005400| 6e 64 20 47 52 41 46 2e | 41 72 63 61 64 65 2c 20 |nd GRAF.|Arcade, |
|00005410| 62 75 74 20 63 61 6e 20 | 62 65 20 75 73 65 64 20 |but can |be used |
|00005420| 66 6f 72 20 61 6e 79 74 | 68 69 6e 67 20 7b 73 65 |for anyt|hing {se|
|00005430| 65 20 61 62 6f 76 65 20 | 66 6f 72 20 61 6e 20 65 |e above |for an e|
|00005440| 78 70 6c 61 6e 61 74 69 | 6f 6e 20 6f 66 20 75 73 |xplanati|on of us|
|00005450| 69 6e 67 20 74 68 65 20 | 6d 61 74 68 65 6d 61 74 |ing the |mathemat|
|00005460| 69 63 61 6c 20 66 75 6e | 63 74 69 6f 6e 20 4d 4f |ical fun|ction MO|
|00005470| 44 20 77 69 74 68 20 74 | 68 65 20 6d 6f 64 65 20 |D with t|he mode |
|00005480| 66 69 65 6c 64 7d 2e 20 | 20 44 6f 6e 27 74 20 74 |field}. | Don't t|
|00005490| 6f 75 63 68 20 69 73 64 | 6f 6e 65 2e 20 20 54 68 |ouch isd|one. Th|
|000054a0| 65 20 72 65 73 74 20 6f | 66 20 74 68 65 20 76 61 |e rest o|f the va|
|000054b0| 72 69 61 62 6c 65 73 20 | 63 61 6e 20 62 65 20 63 |riables |can be c|
|000054c0| 68 61 6e 67 65 64 20 6f | 72 20 64 65 6c 65 74 65 |hanged o|r delete|
|000054d0| 64 2c 20 61 6e 64 20 79 | 6f 75 20 63 61 6e 20 61 |d, and y|ou can a|
|000054e0| 64 64 20 61 73 20 6d 61 | 6e 79 20 66 69 65 6c 64 |dd as ma|ny field|
|000054f0| 73 20 74 6f 20 74 68 65 | 20 73 70 72 69 74 65 20 |s to the| sprite |
|00005500| 6c 69 73 74 20 61 73 20 | 79 6f 75 20 77 61 6e 74 |list as |you want|
|00005510| 2e 20 20 59 6f 75 20 77 | 69 6c 6c 20 68 61 76 65 |. You w|ill have|
|00005520| 20 74 6f 20 67 6f 20 69 | 6e 74 6f 20 74 68 65 20 | to go i|nto the |
|00005530| 63 6f 64 65 20 74 6f 20 | 47 52 41 46 20 74 6f 20 |code to |GRAF to |
|00005540| 64 6f 20 69 74 2c 20 68 | 6f 77 65 76 65 72 2e 20 |do it, h|owever. |
|00005550| 20 49 74 27 73 20 61 62 | 6f 75 74 20 32 2d 33 20 | It's ab|out 2-3 |
|00005560| 70 61 67 65 73 20 64 6f | 77 6e 20 66 72 6f 6d 20 |pages do|wn from |
|00005570| 74 68 65 20 74 6f 70 20 | 6f 66 20 47 52 41 46 2e |the top |of GRAF.|
|00005580| 0d 0d 20 20 47 52 41 46 | 67 6c 6f 62 61 6c 73 20 |.. GRAF|globals |
|00005590| 3d 20 72 65 63 6f 72 64 | 20 7b 74 68 65 20 61 63 |= record| {the ac|
|000055a0| 74 75 61 6c 20 76 61 72 | 69 61 62 6c 65 20 75 73 |tual var|iable us|
|000055b0| 65 64 20 69 73 20 67 47 | 52 41 46 3b 20 65 78 61 |ed is gG|RAF; exa|
|000055c0| 6d 70 6c 65 3a 20 61 63 | 63 65 73 73 20 77 68 61 |mple: ac|cess wha|
|000055d0| 74 73 63 72 6e 7d 0d 20 | 20 20 20 62 63 6b 67 72 |tscrn}. | bckgr|
|000055e0| 6e 64 3a 20 47 52 41 46 | 70 6f 72 74 3b 09 09 09 |nd: GRAF|port;...|
|000055f0| 09 09 09 09 09 09 09 09 | 09 09 09 09 09 09 09 09 |........|........|
|00005600| 09 09 09 09 09 09 09 09 | 09 7b 62 79 20 63 61 6c |........|.{by cal|
|00005610| 6c 69 6e 67 20 67 47 52 | 41 46 2e 77 68 61 74 73 |ling gGR|AF.whats|
|00005620| 63 72 6e 7d 0d 20 20 20 | 20 62 63 6b 67 72 6e 64 |crn}. | bckgrnd|
|00005630| 68 3a 20 47 44 48 61 6e | 64 6c 65 3b 0d 20 20 20 |h: GDHan|dle;. |
|00005640| 20 63 6f 6c 6f 72 70 69 | 63 74 3a 20 47 52 41 46 | colorpi|ct: GRAF|
|00005650| 70 6f 72 74 3b 0d 20 20 | 20 20 6d 61 73 6b 70 69 |port;. | maskpi|
|00005660| 63 74 3a 20 47 52 41 46 | 70 6f 72 74 3b 0d 20 20 |ct: GRAF|port;. |
|00005670| 20 20 64 69 72 74 79 77 | 6f 72 6b 3a 20 47 52 41 | dirtyw|ork: GRA|
|00005680| 46 70 6f 72 74 3b 0d 20 | 20 20 20 63 6f 6c 6f 72 |Fport;. | color|
|00005690| 70 69 63 74 68 3a 20 47 | 44 48 61 6e 64 6c 65 3b |picth: G|DHandle;|
|000056a0| 0d 20 20 20 20 6d 61 73 | 6b 70 69 63 74 68 3a 20 |. mas|kpicth: |
|000056b0| 47 44 48 61 6e 64 6c 65 | 3b 0d 20 20 20 20 64 69 |GDHandle|;. di|
|000056c0| 72 74 79 77 6f 72 6b 68 | 3a 20 47 44 48 61 6e 64 |rtyworkh|: GDHand|
|000056d0| 6c 65 3b 0d 20 20 20 20 | 43 75 72 50 6f 72 74 3a |le;. |CurPort:|
|000056e0| 20 47 57 50 74 72 3b 0d | 20 20 20 20 43 75 72 44 | GWPtr;.| CurD|
|000056f0| 65 76 3a 20 47 44 48 61 | 6e 64 6c 65 3b 0d 20 20 |ev: GDHa|ndle;. |
|00005700| 20 20 64 69 66 66 6c 65 | 76 65 6c 3a 20 62 6f 6f | diffle|vel: boo|
|00005710| 6c 65 61 6e 3b 7b 69 66 | 20 64 69 66 66 6c 65 76 |lean;{if| difflev|
|00005720| 65 6c 3d 74 72 75 65 20 | 74 68 65 6e 20 73 70 72 |el=true |then spr|
|00005730| 69 74 65 73 20 6f 6e 20 | 64 69 66 66 65 72 65 6e |ites on |differen|
|00005740| 74 20 76 65 72 74 69 63 | 61 6c 20 6c 65 76 65 6c |t vertic|al level|
|00005750| 73 20 62 75 74 20 73 61 | 6d 65 20 68 6f 72 69 7a |s but sa|me horiz|
|00005760| 6f 6e 74 61 6c 20 73 65 | 74 74 69 6e 67 73 20 77 |ontal se|ttings w|
|00005770| 69 6c 6c 20 6e 6f 74 20 | 63 6f 6c 6c 69 64 65 2e |ill not |collide.|
|00005780| 7d 0d 20 20 20 20 77 69 | 6e 72 65 63 74 2c 20 73 |}. wi|nrect, s|
|00005790| 63 72 6e 72 65 63 74 2c | 20 65 78 74 72 61 72 65 |crnrect,| extrare|
|000057a0| 63 74 2c 20 65 78 74 72 | 61 72 65 63 74 32 3a 20 |ct, extr|arect2: |
|000057b0| 72 65 63 74 3b 0d 20 20 | 20 20 70 69 63 74 68 61 |rect;. | pictha|
|000057c0| 6e 64 2c 20 65 78 74 72 | 61 70 69 63 74 2c 20 65 |nd, extr|apict, e|
|000057d0| 78 74 72 61 70 69 63 74 | 32 3a 20 70 69 63 48 61 |xtrapict|2: picHa|
|000057e0| 6e 64 6c 65 3b 0d 20 20 | 20 20 77 68 61 74 73 63 |ndle;. | whatsc|
|000057f0| 72 6e 3a 20 69 6e 74 65 | 67 65 72 3b 0d 20 20 20 |rn: inte|ger;. |
|00005800| 20 72 6f 6f 74 3a 20 69 | 6e 74 65 67 65 72 3b 0d | root: i|nteger;.|
|00005810| 20 20 20 20 4d 61 69 6e | 57 69 6e 64 6f 77 3a 20 | Main|Window: |
|00005820| 43 57 69 6e 64 6f 77 50 | 74 72 3b 0d 20 20 20 20 |CWindowP|tr;. |
|00005830| 4d 6e 57 69 6e 64 3a 20 | 57 69 6e 64 6f 77 50 74 |MnWind: |WindowPt|
|00005840| 72 3b 0d 20 20 20 20 41 | 45 45 72 72 3a 20 6f 73 |r;. A|EErr: os|
|00005850| 65 72 72 3b 0d 20 20 20 | 20 77 68 61 74 73 6f 72 |err;. | whatsor|
|00005860| 74 73 74 79 6c 65 2c 20 | 77 68 61 74 63 6f 6c 6c |tstyle, |whatcoll|
|00005870| 69 73 69 6f 6e 73 74 79 | 6c 65 3a 20 69 6e 74 65 |isionsty|le: inte|
|00005880| 67 65 72 3b 0d 20 20 20 | 20 61 72 65 6e 6f 6e 65 |ger;. | arenone|
|00005890| 3a 20 62 6f 6f 6c 65 61 | 6e 3b 7b 77 68 65 74 68 |: boolea|n;{wheth|
|000058a0| 65 72 20 74 68 65 72 65 | 20 61 72 65 20 61 6e 79 |er there| are any|
|000058b0| 20 63 75 72 72 65 6e 74 | 20 73 70 72 69 74 65 73 | current| sprites|
|000058c0| 7d 0d 20 20 20 20 61 75 | 74 6f 50 49 43 54 3a 20 |}. au|toPICT: |
|000058d0| 62 6f 6f 6c 65 61 6e 3b | 0d 20 20 20 20 61 75 74 |boolean;|. aut|
|000058e0| 6f 73 6f 75 72 63 65 72 | 65 63 74 2c 20 61 75 74 |osourcer|ect, aut|
|000058f0| 6f 73 69 7a 65 72 65 63 | 74 3a 20 72 65 63 74 3b |osizerec|t: rect;|
|00005900| 0d 20 20 20 65 6e 64 3b | 0d 0d 54 68 65 20 6f 6e |. end;|..The on|
|00005910| 6c 79 20 67 47 52 41 46 | 20 66 69 65 6c 64 73 20 |ly gGRAF| fields |
|00005920| 79 6f 75 20 68 61 76 65 | 20 74 6f 20 77 6f 72 72 |you have| to worr|
|00005930| 79 20 61 62 6f 75 74 20 | 61 72 65 20 64 69 66 66 |y about |are diff|
|00005940| 6c 65 76 65 6c 2c 20 77 | 68 61 74 73 63 72 6e 2c |level, w|hatscrn,|
|00005950| 20 61 6e 64 20 61 72 65 | 6e 6f 6e 65 2e 20 20 49 | and are|none. I|
|00005960| 66 20 79 6f 75 20 61 72 | 65 20 6d 61 6b 69 6e 67 |f you ar|e making|
|00005970| 20 61 20 67 61 6d 65 20 | 77 68 65 72 65 20 79 6f | a game |where yo|
|00005980| 75 20 77 61 6e 74 20 73 | 6f 6d 65 20 73 70 72 69 |u want s|ome spri|
|00005990| 74 65 73 20 7b 70 65 6f | 70 6c 65 20 73 70 72 69 |tes {peo|ple spri|
|000059a0| 74 65 73 2c 20 75 73 75 | 61 6c 6c 79 7d 20 74 6f |tes, usu|ally} to|
|000059b0| 20 62 65 20 61 62 6c 65 | 20 74 6f 20 67 6f 20 61 | be able| to go a|
|000059c0| 72 6f 75 6e 64 20 6f 74 | 68 65 72 73 20 77 69 74 |round ot|hers wit|
|000059d0| 68 6f 75 74 20 63 6f 6c | 6c 69 64 69 6e 67 20 77 |hout col|liding w|
|000059e0| 69 74 68 20 74 68 65 6d | 20 7b 6c 69 6b 65 20 61 |ith them| {like a|
|000059f0| 20 46 69 6e 61 6c 20 46 | 69 67 68 74 20 74 79 70 | Final F|ight typ|
|00005a00| 65 20 67 61 6d 65 7d 2c | 20 73 65 74 20 67 47 52 |e game},| set gGR|
|00005a10| 41 46 2e 64 69 66 66 6c | 65 76 65 6c 20 74 6f 20 |AF.diffl|evel to |
|00005a20| 74 72 75 65 2e 20 49 74 | 27 73 20 64 65 66 61 6c |true. It|'s defal|
|00005a30| 74 20 69 73 20 66 61 6c | 73 65 2e 20 20 49 66 20 |t is fal|se. If |
|00005a40| 69 74 20 69 73 20 74 72 | 75 65 2c 20 74 68 65 6e |it is tr|ue, then|
|00005a50| 20 6f 6e 6c 79 20 73 70 | 72 69 74 65 73 20 74 68 | only sp|rites th|
|00005a60| 61 74 20 6f 76 65 72 6c | 61 70 20 77 69 74 68 20 |at overl|ap with |
|00005a70| 74 68 65 20 73 61 6d 65 | 20 76 65 72 74 69 63 61 |the same| vertica|
|00005a80| 6c 20 70 6f 73 69 74 69 | 6f 6e 20 63 61 6e 20 63 |l positi|on can c|
|00005a90| 6f 6c 6c 69 64 65 2e 20 | 20 49 66 20 69 74 20 69 |ollide. | If it i|
|00005aa0| 73 20 66 61 6c 73 65 2c | 20 74 68 61 6e 20 61 6c |s false,| than al|
|00005ab0| 6c 20 73 70 72 69 74 65 | 73 20 74 68 61 74 20 6f |l sprite|s that o|
|00005ac0| 76 65 72 6c 61 70 20 68 | 6f 72 69 7a 6f 6e 74 61 |verlap h|orizonta|
|00005ad0| 6c 6c 79 2c 20 65 76 65 | 6e 20 69 66 20 74 68 65 |lly, eve|n if the|
|00005ae0| 69 72 20 76 65 72 74 69 | 63 61 6c 20 70 6f 73 69 |ir verti|cal posi|
|00005af0| 74 69 6f 6e 73 20 61 72 | 65 20 64 69 66 66 65 72 |tions ar|e differ|
|00005b00| 65 6e 74 2c 20 77 69 6c | 6c 20 63 6f 6c 6c 69 64 |ent, wil|l collid|
|00005b10| 65 2e 20 57 68 61 74 73 | 63 72 6e 20 77 61 73 20 |e. Whats|crn was |
|00005b20| 65 78 70 6c 61 69 6e 65 | 64 20 61 62 6f 76 65 20 |explaine|d above |
|00005b30| 69 6e 20 74 68 65 20 73 | 65 63 74 69 6f 6e 20 61 |in the s|ection a|
|00005b40| 62 6f 75 74 20 74 68 65 | 20 73 70 72 69 74 65 20 |bout the| sprite |
|00005b50| 72 65 63 6f 72 64 2e 20 | 20 49 66 20 61 72 65 6e |record. | If aren|
|00005b60| 6f 6e 65 20 69 73 20 74 | 72 75 65 2c 20 74 68 65 |one is t|rue, the|
|00005b70| 6e 20 74 68 65 72 65 20 | 61 72 65 20 6e 6f 20 65 |n there |are no e|
|00005b80| 78 69 73 74 69 6e 67 20 | 73 70 72 69 74 65 73 3b |xisting |sprites;|
|00005b90| 20 69 66 20 69 74 20 69 | 73 20 66 61 6c 73 65 2c | if it i|s false,|
|00005ba0| 20 74 68 65 6e 20 74 68 | 65 72 65 20 61 72 65 20 | then th|ere are |
|00005bb0| 65 78 69 73 74 69 6e 67 | 20 73 70 72 69 74 65 73 |existing| sprites|
|00005bc0| 2e 0d 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005bd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005be0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005bf0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005c00| 00 00 01 00 00 00 01 1a | 00 00 00 1a 00 00 00 32 |........|.......2|
|00005c10| 72 65 77 61 72 65 2c 20 | 70 75 62 6c 69 63 20 64 |reware, |public d|
|00005c20| 6f 6d 61 69 6e 2c 20 65 | 74 63 2e 29 20 79 6f 75 |omain, e|tc.) you|
|00005c30| 11 47 52 41 50 48 49 43 | 53 20 6d 61 6e 75 61 6c |.GRAPHIC|S manual|
|00005c40| 20 32 02 00 02 00 54 45 | 58 54 74 74 78 74 00 00 | 2....TE|XTttxt..|
|00005c50| 02 00 54 45 58 54 74 74 | 78 74 00 00 00 00 00 00 |..TEXTtt|xt......|
|00005c60| 00 00 00 00 00 00 00 00 | 00 00 80 00 00 00 00 00 |........|........|
|00005c70| 00 00 ab f4 ca a9 00 00 | 00 00 00 00 01 4c 2e 20 |........|.....L. |
|00005c80| 20 53 65 6e 64 20 74 68 | 65 20 70 72 6f 67 72 61 | Send th|e progra|
|00005c90| 6d 20 74 6f 20 50 72 6f | 67 6f 66 66 40 41 4f 4c |m to Pro|goff@AOL|
|00005ca0| 2e 63 6f 6d 28 20 69 66 | 20 79 6f 75 27 72 65 20 |.com( if| you're |
|00005cb0| 6f 6e 20 41 6d 65 72 69 | 63 61 20 4f 6e 6c 69 6e |on Ameri|ca Onlin|
|00005cc0| 65 29 2c 20 6f 72 20 74 | 68 65 20 61 64 64 72 65 |e), or t|he addre|
|00005cd0| 73 73 20 61 62 6f 76 65 | 2e 20 20 48 6f 77 65 76 |ss above|. Howev|
|00005ce0| 65 72 2c 20 79 6f 75 20 | 64 6f 6e 27 74 20 68 61 |er, you |don't ha|
|00005cf0| 76 65 20 74 6f 20 67 69 | 76 65 20 6d 65 20 61 6e |ve to gi|ve me an|
|00005d00| 00 00 00 16 00 01 00 00 | 00 00 00 10 00 0c 00 01 |........|........|
|00005d10| 00 00 00 0c 00 00 00 00 | 00 00 00 00 01 00 00 00 |........|........|
|00005d20| 01 1a 00 00 00 1a 00 00 | 00 32 03 82 a6 18 21 6c |........|.2....!l|
|00005d30| 00 00 00 1c 00 32 00 00 | 73 74 79 6c 00 00 00 0a |.....2..|styl....|
|00005d40| 00 80 ff ff 00 00 00 00 | 03 82 a9 78 00 00 00 00 |........|...x....|
|00005d50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005d60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005d70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+